Forum Moderators: coopster
I've ironed out all the syntax errors. The script checks if the cookie exists or not. If not, then it displays the login form. Of course first time testing it, cookie doesn't exist, so i have to login. It checks the user and pass against a database where the user and pass is stored. However, despite typing the correct user/pass, it says the password is wrong..
I'm using the script from this tutorial
[php.about.com...]
Except i'm not using the registration bit. I've entered the user/pass directly into the database using phpmyadmin.
Plus there are some errors in the script in that link, such as the 'else'
}
else
{
header("Location: members.php");
}
}
}
There that shouldn't be there as it gives me an error, and 1 } too many as well.
:)
- check spelling of submitted data. Capital/lower case letters do affect your query results
- on the errors: make sure you hace all the script - some times you forget to copy some part because a popup banner is in the way. Try to use a download link if available
And please... do not post urls with scripts here. Refer to TOS part of forum for info
Anyway...it might be the encoded bit with the md5. As thats used in the script.
Need to figure out then how to encode the password with phpmyadmin.
thanks
:)
add in your query "die"
for example: $result=mysql_query($sql) or die(mysql_error)());
this will throw any DB error
for script error
at the top of your page
but bellow session_start() if any session is used.
type: error_reporting(E_ALL);
then repport your findings