4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 help with this
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
hailvarg
Junior WebHelper
Junior WebHelper


Joined: 04 Jul 2004
Posts: 2
Location: http://www.ryanormrod.com

PostPosted: Wed Sep 29, 2004 10:21 pm (19 years, 6 months ago) Reply with QuoteBack to Top

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");
}
?>
OfflineView User's ProfileFind all posts by hailvargSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Thu Sep 30, 2004 5:12 am (19 years, 6 months ago) Reply with QuoteBack to Top

What happens when you run the script?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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.193601 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme