|
Author |
Message |
hailvarg
Junior WebHelper
Joined: 04 Jul 2004
Posts: 2
Location: http://www.ryanormrod.com
|
Posted:
Wed Sep 29, 2004 10:21 pm (19 years, 7 months ago) |
|
can anyone see why this dont work ?
Code: | <?php
//conection here
$e=0;
$user = $_POST["username"];
$password = $_POST["password"];
$result = MYSQL_QUERY("SELECT * from gpmembers WHERE gpusername='$user' and gppassword='$password'") or die("Invalid Login Details");
$worked = mysql_fetch_array($result);
$username2 = $worked[gpusername];
$password2 = $worked[gppassword];
if($user == $username2) $e++; else echo"Invalid Username";
if($password == $password2) $e++; else echo"Invalid Password";
if($e==2) {
setcookie("user", $user, $time+3200);
setcookie("pass", $password, $time+3200);
echo("Logged In as $_COOKIE[user]");
} else {
echo("Login failed, make sure your username and password are correct");
}
?> |
|
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Sep 30, 2004 5:12 am (19 years, 7 months ago) |
|
What happens when you run the script? |
________________________________
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.137984 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |