todayme Posted March 6, 2007 Share Posted March 6, 2007 I have this code below but I only want authentication to fail if both the number of rows are less than 1 AND if $SESSION['accountsession'] is equal to "" Anyone got any sugestions I am very new to PHP so I am not firmiliar with syntax. Thankyou in advance. if(mysql_num_rows($data) < 1) and $SESSION['accountsession'] = "" Is the above correct? I bet its not! Please if someone could post there opinion. session_start(); $_SESSION['accountsession'] = $accountsession; if(mysql_num_rows($data) < 1) { print "Authentication Failed"; session_unset(); session_destroy(); print "Session Destroyed"; exit(); } Link to comment https://forums.phpfreaks.com/topic/41382-simple-if-and-statment-please-help/ Share on other sites More sharing options...
genericnumber1 Posted March 6, 2007 Share Posted March 6, 2007 if(mysql_num_rows($data) < 1 && $SESSION['accountsession'] == "") { Link to comment https://forums.phpfreaks.com/topic/41382-simple-if-and-statment-please-help/#findComment-200480 Share on other sites More sharing options...
todayme Posted March 6, 2007 Author Share Posted March 6, 2007 Arrrrrrrr thanks heaps still geting use to new language. Link to comment https://forums.phpfreaks.com/topic/41382-simple-if-and-statment-please-help/#findComment-200485 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.