09-14-2009, 04:47 PM
|
#3 (permalink)
|
|
The Contributor
Join Date: Jul 2009
Posts: 80
Thanks: 13
|
Do you see anything wrong with the following code, it wont allow me to login
PHP Code:
<?php
$login = "SELECT * FROM tbl_user_account WHERE user_account_username = '".$username."' AND user_account_password = '".$password."'";
$result = mysql_query($login);
if (!$result)
{
header('Location: login.php?error=1');
}
else
{
$sqlupdate = "UPDATE tbl_user_account SET user_account_last_login = '".$now."', user_account_last_login_ip = '".$ip."' WHERE user_account_username ='".$username."' AND user_account_password = '".$password."'";
setcookie("logincookie", $username, time()+3600);
header('Location: profile.php');
}
mysql_free_result($result);
?>
|
|
|
|