![]() |
user login page
anyone see anything wrong in this script? for some reason the login wont work.
i decided to use sessions instead of cookies for authentication. Code:
<?php |
Whats the error your'e getting?
Update: Assign the sessions to the $data variable when looping. Like so: PHP Code:
that generates the session, then assigns the session to sql row, then you register the session to it and it should be there. Uhh.. I don't know what else considering I'm half asleep here. Also remember the mysql_real_escape_string function I told ye, also if you want to what I ment by generation. use session_start() then do print_r(session_id()) |
i fixed a couple of things on the code that i found but now when i try to login , lets say the login and password is "dumb" and the same information exists in the database and the password in the database is in md5 thing is when i login it says password entered incorrectly. so i decided to output the md5 version of the password that i entered and match it against the one existing in the database and they look like two different strings. what is wrong here? i cant seem to find it.
Code:
<?php |
have you given your database column enough room to hold the entire MD5 string? is the DB string shorter than the new MD5?
|
also do you have register_globals off, if so just use $_SESSION to create a session as they are registered automatically, otherwise use session_register(), If your script uses session_register it will not work if register_globals is turned off.
|
| All times are GMT. The time now is 06:35 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0