brown2005 Posted March 4, 2007 Share Posted March 4, 2007 i know how to do if($test == "cabbages") but i have forgot how to write if($test does not = "cabbages") thanks in advance Quote Link to comment Share on other sites More sharing options...
Orio Posted March 4, 2007 Share Posted March 4, 2007 if($test != "cabbages") Or if($test <> "cabbages") More info. Orio. Quote Link to comment Share on other sites More sharing options...
brown2005 Posted March 4, 2007 Author Share Posted March 4, 2007 which 1 is best wat i want to do is, i have a check box for terms and conditions so if it is not checked i want it to put an error $error .= "You have not accepted the Terms & Conditions"; Quote Link to comment Share on other sites More sharing options...
Archadian Posted March 4, 2007 Share Posted March 4, 2007 use the != (! = not meaning not equal to) Quote Link to comment Share on other sites More sharing options...
Orio Posted March 4, 2007 Share Posted March 4, 2007 For that you need to preform the following check: <?php if(!isset($_POST['checkbox_name'])){ $error .= "You have not accepted the Terms & Conditions"; } ?> Orio. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.