Re: Re: A general UL script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to validate wether or not to run the image check script.
however empty the file field(s) are This script is started... how do I tell it 
there is nothing here, go do other stuff.
for both multiupload forms and single upload forms since they're supposed to 
share this script. My logic tells me there should be something like this if 
statements, but then again, I'm more of a copy paster rather than a expert.

On Sunday 29 October 2006 00:03, Ed Lazor wrote:
> Are you just trying to tell whether the form has been submitted?  Or
> are you just trying to validate form data?
>
> -------------- verify form submitted -----------------
> if (isset($_POST)) {
> 	// form submitted, process data
> } else {
> 	// display form
> }
>
> ----------------------------------------------------------
> http://us2.php.net/manual/en/features.file-upload.php
>
> Example 38-2.  Validating file uploads
>
> On Oct 28, 2006, at 2:46 PM, Børge Holen wrote:
> > Ok. got that thanks.
> > But that leaves me a bit off to how to tell the script to leave it
> > alone.
> > Is it possible to check it
> >
> > or maby even better. Posible to not add an empty field in the submit.
> > The multifile submit I actually intended this script for, always
> > send the
> > first field empty so later on I slice the array to cut out the
> > first'n empty
> > field.
> >
> > Witch ALSO would be very helpful, since I right this minute seems to
> > believe/found out that Safari actually seems to send the field in the
> > opposite order of Firefox??? Maby there is something else, but the
> > script
> > stops when I check the array for actual images.
> >
> > On Saturday 28 October 2006 23:33, M.Sokolewicz wrote:
> >> Børge Holen wrote:
> >>> When I use a normal single file upload form; both of these
> >>> statements
> >>> will continue wether my form is empty or not, why?
> >>>
> >>> if(!empty($_FILES)){
> >>> 	do som checking if its a jpg.
> >>> 	if not exit;
> >>>
> >>> if(isset($_FILES)){
> >>
> >> because it IS set and NOT empty.
> >> $_FILES['file_upload_field'] is set, it's got no data, but it IS set.
> >> $_FILES is set because $_FILES['file_upload_field'] exists.
> >> Submitting a blank form sends all "variables" though without actual
> >> (non-default) content.
> >>
> >> - tul
> >
> > --
> > ---
> > Børge
> > Kennel Arivene
> > http://www.arivene.net
> > ---
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
---
Børge
Kennel Arivene 
http://www.arivene.net
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux