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?? Link to comment https://forums.phpfreaks.com/topic/149828-solved-or-statement-witihn-an-if/ 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'])) Link to comment https://forums.phpfreaks.com/topic/149828-solved-or-statement-witihn-an-if/#findComment-786762 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'])) Link to comment https://forums.phpfreaks.com/topic/149828-solved-or-statement-witihn-an-if/#findComment-786768 Share on other sites More sharing options...
mikebyrne Posted March 17, 2009 Author Share Posted March 17, 2009 Thanks! Link to comment https://forums.phpfreaks.com/topic/149828-solved-or-statement-witihn-an-if/#findComment-786793 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.