Page 1 of 1

Cookie not being created O_o

Posted: Sun May 11, 2003 3:56 pm
by Aaron
Ok so the cookie isnt being created, dont know why O_o

Code: Select all

<? 

	$blah = mysql_query("SELECT username, password FROM unz_users WHERE username = '$username' and password = '$password'");
	$affected = mysql_fetch_assoc($blah);

			if($affected > 0)

	&#123;srand((double)microtime()*1000000); 
	$val_of_rand = rand(); 
	setcookie("$username",$val_of_rand,time()+14400,"/",".localhost/admin",0); 
	
	echo "<table width="100%" border="0" cellspacing="0" cellpadding="5">
	<tr><td align="left" valign="top" class="standard"><p><img src="images/icon_login.gif" width="32" height="32" align="left">Welcome to your account, $username. Your IP is $REMOTE_ADDR, and your password is $password</p></td></tr></table>";&#125;
	  
	  else
	  
	  &#123;echo "<table width="100%" border="0" cellspacing="0" cellpadding="5">
		<tr><td align="left" valign="top" class="standard"><p><img src="images/icon_login.gif" width="32" height="32" align="left">The details you entered did not match our records, please try again but hitting your back button.</p></td></tr></table>";&#125;

?>