Making Login help.
Posted 05 September 2006 - 01:35 AM
Posted 05 September 2006 - 01:56 AM
Posted 05 September 2006 - 02:02 AM
Posted 05 September 2006 - 02:10 AM
-- You have a table in your database that holds peoples usernames and passwords...
You want these people to be able to use a form to log in and say edit some values that would say make up something like a profile?
Posted 05 September 2006 - 02:28 AM
Posted 05 September 2006 - 03:38 AM
You could set up your users table with
And whatever else
Create a session variable that holds something like their id. When they click the link to manage their profile, have the id passed in (profile.php?id=$_SESSION['id']) and then perform a check to see that the user is logged in and that the id attached to their login matches the one tied to their account, pull the info up from the DB into a table and then let them edit it.
Posted 05 September 2006 - 04:12 AM
Posted 05 September 2006 - 04:16 AM
Then when logged in it will take you to a form that contains text boxes or whatever is needed for the information in the database.. throw in a query to select * from users where username = $username
$username will be declared from the login script (probably in a session or a cookie actually)
Then echo out the information into the text boxes that way their current information is listed.. from there in the form you have the submit button and on that you just use the mysql UPDATE command to do the updating.. really not that hard..
Posted 05 September 2006 - 04:19 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users