Help needed with script

Reply

Join Date: Jan 2005
Posts: 1
Reputation: seand10 is an unknown quantity at this point 
Solved Threads: 0
seand10 seand10 is offline Offline
Newbie Poster

Help needed with script

 
0
  #1
Jan 21st, 2005
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?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 348
Reputation: paradox814 is an unknown quantity at this point 
Solved Threads: 4
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: Help needed with script

 
0
  #2
Jan 22nd, 2005
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!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC