Jump to content

[SOLVED] if statement and empty


wrathican

Recommended Posts

hi.

i have my form and what i want to happen is when ALL the values are not empty i want to process the form

but if just one of the values is empty i want top redisplay the form

i have 15 values in my form, i know thats quite a lot but i need them all

so how would i do this?

 

E.g:

if(!empty($_POST['value1'],$_POST['value2'])
{
processform();
}else{
//redisplay the form
}

 

i have tried this and i get this error:

Parse error: syntax error, unexpected ',', expecting ')' in F:\wamp\www\test\index.php on line 68

 

line 68 is the begining of the IF statement

Link to comment
https://forums.phpfreaks.com/topic/61356-solved-if-statement-and-empty/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.