0

I have a website that requires users to register. When they register their details (name, dob etc) go into an sql database. The form it goes into is called User_dtls. I want the users to be able to edit their own details through the website but im not sure how to do it. any ideas?

2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by paradox814
0

U can more or less use the same form that they used to sign up, but when this page loads use a SELECT * User_dtls and input that data into the form. Now obviously you wouldn't want them to change certain info so it's up to you to decide what they can & can't change ... aka they cant change the acct_created column (account created, if you have one in there, etc, etc...)

once that is done and the user clicks submit/save/update or whatever then go through your same data validation scheme that you did during signup... Once that is done you will be able to use the UPDATE command, for instance

UPDATE User_dtls SET first_name='$first_name', last_name='$last_name' WHERE user_name='$user_name'

yadda yadda yadda, DO NOT forget the WHERE option or you will end up changing EVERYONE's details (a very bad thing indeed!!!)

i sure hope this helps!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.