daveoffy Posted December 31, 2008 Share Posted December 31, 2008 I need to have 2 if statements. if($memberid == $getid) or if($memberid == $friend) I need a code like that but I don't think or will work. Link to comment https://forums.phpfreaks.com/topic/139012-solved-have-2-if/ Share on other sites More sharing options...
revraz Posted December 31, 2008 Share Posted December 31, 2008 IF ($memberid == $getid || $memberid == $friend) { Link to comment https://forums.phpfreaks.com/topic/139012-solved-have-2-if/#findComment-727047 Share on other sites More sharing options...
daveoffy Posted December 31, 2008 Author Share Posted December 31, 2008 I get an error Parse error: syntax error, unexpected T_BOOLEAN_OR in /******/***/*******.com/admin/site/pro.php on line 13 Line 12, 13, and 14 are if (mysql_num_rows($result) == 1){ if ($memberid == $getid) || ($memberid == $friend){ echo 'Hello'; Link to comment https://forums.phpfreaks.com/topic/139012-solved-have-2-if/#findComment-727051 Share on other sites More sharing options...
premiso Posted December 31, 2008 Share Posted December 31, 2008 if (($memberid == $getid) || ($memberid == $friend)) { Link to comment https://forums.phpfreaks.com/topic/139012-solved-have-2-if/#findComment-727054 Share on other sites More sharing options...
daveoffy Posted December 31, 2008 Author Share Posted December 31, 2008 While this site went down for like 10 mins for me I did some google and just used else if and it works fine. Thanks for your help also. Link to comment https://forums.phpfreaks.com/topic/139012-solved-have-2-if/#findComment-727062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.