small problem here :)
Posted: Fri May 05, 2006 10:16 pm
feyd | Please use
the other information for login cycles simply just says what your username is and checks for these cookies
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
here is an example of my problem in story form
i made a starting account, example being pizza with the password atypeoffood
i make a new account, totally different password
the password for the new account doesn't work, but when i try to put in the password for pizza account into the new account, it works.
what is the problem?
heres an example of what i'm using.Code: Select all
if(isset($_POST['login'])){
$username=$_POST['username'];
$_POST['password']=md5($_POST['password']);
$h=mysql_query("select password from users where username='$username'");
if($_POST['password']==$h){
setcookie("etrin_username",$_POST['username'],time()+60*60*24*365);
setcookie("etrin_password",$_POST['password'],time()+60*60*24*365);
echo"<meta http-equiv=\"Refresh\" content=\"3;url=$HTTP_SERVER_VARS[PHP_SELF]\">";
}
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]