Jump to content

[SOLVED] if isset with another if


vicodin

Recommended Posts

Wondering if this is the right way to do it.....

I want the script to check a variable is set and if another is blank.

so would it be like this?

 

if (isset($_POST['var'] && !$_POST['var2'] ==""){
DoThisFunction();
}
else
{
echo 'Variable is not set';
}

 

Would that be correct?

 

Link to comment
https://forums.phpfreaks.com/topic/88346-solved-if-isset-with-another-if/
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.