Jump to content

Multiple ISSET statements in one if()


grantf

Recommended Posts

Hi all, am trying to get an if statement to evaluate 2 isset()'s at the same time with the following code, it doesnt seem to work.

Does anyone know what i am doing wrong?

 

 if(!isset($_POST['var1']) && !isset($_POST['var2']))

Link to comment
Share on other sites

Without knowing what it is you are trying to check, it's hard to say what your problem is. But here are some things you can check:

 

- should you be using || instead of &&?

- are the variable names spelled the same in your html form as they are in your script?

- did you really mean to check to see if they weren't set, instead of if they are set?

- is the action on your form set to 'get' instead of 'post'?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.