Hi All

I am very fed up and confused to why some simple form error checking is
not working.

All I want to do is check if a field has something in it the its ok else
show error.

I have a fields in my form that is for people to upload an image.

I have tried this.

If(!$_POST[img]){
Do something
}

Or this

If(!$_FILE[img]){
Do something
}

Or this

If(empty($_POST[img])){
Do something
}

Or this

If(empty($_FILE[img])){
Do something
}

Or this

If(!isset($_POST[img])){
Do something
}

Or this

If(!isset($_FILE[img])){
Do something
}

And many other permiatations of these functions but to no avail. All I
get is my error msg whether or not the field has anyhting in it or
nothing but never the desired affect.

Its got to be something to do with global vars on switch as if I swith
it off and go back to just calling the var it works a treat.

This needless to say is giving me a headache as it is vital that I check
the form before posting.

So any help or guidence will be very much appreciated.

Yes I have checked php.net and various other doc sites, just in case
anyone says "check the docs".

Hope your all well

Dave C


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

Reply via email to