Hello,
I'm still working on my admin CP and everything, but lately, I just can't seem to get this fixed. Basically, I have a form witch asks for the username and password, then it goes to "check.php" and if the password matches with the database info, you are cookied and re-directed to the admin CP. if not, text is displayed saying the login was unsuccessful. My problem is the my code does'nt seem to be getting the info from the database. The name of the variables for the username and password from the for are $user and $password.
This is the code I have for check.php, I get no errors, but I even tried echoing $password_check and it shows nothing.
<?php
$db_name = "novaz3rodb";
$connect = mysql_connect('localhost','login','password');
$db = mysql_select_db($db_name,$connect);
$query1 = mysql_query("SELECT password FROM adminlogin WHERE username = '$user'", $connect);
$row = mysql_fetch_array($query1);
$password_check = $row['password'];
if ($password_check == $password)
{
header("Location: http://novaz3ro.com/admincp.php");
exit;
}
else
{
echo "Login unsuccessful, please try again";
}
?>
thanks for all your time