Jump to content

Simple If and statment! Please help


todayme

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.