Jump to content

IF(variable = NULL)


legohead6

Recommended Posts

You'll want to code your if statement like so:
[code]if(is_null($first) || is_null($last) || is_null($gun) || is_null($age) || is_null($saying) || is_null($email) || is_null($phone) || is_null($users) || is_null($pass))
{
    echo "Please fill in all fields!";
}
else
{
    //process form data
}[/code]
Link to comment
https://forums.phpfreaks.com/topic/6370-ifvariable-null/#findComment-23102
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.