HaZaRd420 Posted September 5, 2006 Share Posted September 5, 2006 Hello all, This may be confusing and if you dont want to help that is fine with me. What I am trying to get at is to be able to login to a set ID that already has the name and set a password to it so the person will be able to edit there ID ( whats all in that certain id ). If I explained this to where you can not understand it, I will try to rephrase it for you, But hopefuly you will get what I am saying. I dont care about setting cookies or anything, I was just wondering if there is a quick way of doing this which Im sure there is. Thanks. Quote Link to comment Share on other sites More sharing options...
radar Posted September 5, 2006 Share Posted September 5, 2006 Yeah it makes no sense... you want to log into an id and set a password to is so they can edit their id.. makes no sense... Quote Link to comment Share on other sites More sharing options...
HaZaRd420 Posted September 5, 2006 Author Share Posted September 5, 2006 Well not edit the ID but im saying point the Login to the ID so I can edit the rest of the fields. Quote Link to comment Share on other sites More sharing options...
radar Posted September 5, 2006 Share Posted September 5, 2006 Okay -- so correct me if I am wrong..-- 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? Quote Link to comment Share on other sites More sharing options...
HaZaRd420 Posted September 5, 2006 Author Share Posted September 5, 2006 Yes radar. Thats exactly what im getting at. So is this possible? Quote Link to comment Share on other sites More sharing options...
Wintergreen Posted September 5, 2006 Share Posted September 5, 2006 Well, to do it in the most basic way possible:You could set up your users table withusernameemailuseridurlbiopasswordAnd whatever elseCreate 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. Quote Link to comment Share on other sites More sharing options...
HaZaRd420 Posted September 5, 2006 Author Share Posted September 5, 2006 But I already have a table with what I want on it. I dont see why I can take the existing and input it that way then making a whole new table. Quote Link to comment Share on other sites More sharing options...
radar Posted September 5, 2006 Share Posted September 5, 2006 First off -- on this site (im not sure where it is) there is a tutorial for making a login script... You want to follow that tutorial to make the login script...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.. Quote Link to comment Share on other sites More sharing options...
HaZaRd420 Posted September 5, 2006 Author Share Posted September 5, 2006 Ehhhh, I guess I will figure somthing out. Just seems somthings get to hard when there easy. :P thanks much radar. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.