mikebyrne Posted March 17, 2009 Share Posted March 17, 2009 At present my code looks like this if(!empty($_POST['Fname'] )) { $Address2 = $_POST['Address2']; $Fname=$_POST['Fname']; $Sname=$_POST['Sname']; $Address1=$_POST['Address1']; $Address2=$_POST['Address2']; $Address3=$_POST['Address3']; $Address4=$_POST['Address4']; $Station=$_POST['Station']; $Vote=$_POST['Vote']; But I would like to change the first line and put an OR statemet in it ie if(!empty($_POST['Fname'] ) OR if(!empty($_POST['Sname'] )) How would I code this?? Quote Link to comment Share on other sites More sharing options...
jen91 Posted March 17, 2009 Share Posted March 17, 2009 hey mike, maybe something like if(!empty($_POST['Fname']) || !empty($_POST['Sname'])) Quote Link to comment Share on other sites More sharing options...
monkeytooth Posted March 17, 2009 Share Posted March 17, 2009 Yours: if(!empty($_POST['Fname'] ) OR if(!empty($_POST['Sname'] )) Re-Done: if((!$_POST['Fname']) OR (!$_POST['Sname'])) if the "OR" doesnt work try if((!$_POST['Fname']) || (!$_POST['Sname'])) Quote Link to comment Share on other sites More sharing options...
mikebyrne Posted March 17, 2009 Author Share Posted March 17, 2009 Thanks! 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.