How to code if not (isset($_POST['xxx'])

Hi,

I want to validate that two check boxes were unchecked.

How would I code:

if
      not    (isset($_POST['one']) && not   (isset($_POST['two'])

location redirect>>>>try again

Not s and ands , I'm thinking could be a problem causes problems

Isaac
TechIsaacIT Contracting Asked:
Who is Participating?
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
This is basically it.  A '!' before the function means 'not'.
if ((!isset($_POST["one"])) && (!isset($_POST["two"]))) header('Location: oldpage.php');

Open in new window

0
 
MarcusSjogrenCommented:
You can also use Empty($_POST["one"]), don't remember the difference by head but check php.net
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.