|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
editing the values by the site user?
ok so people register at my site, and then when they sign in, they can edit their details, the question is HOW do i do that? should i just have a big form with all the fields in, and do a search for that particular user's details from the database and put them = to each field something like:
//do a query //if row //one form field value = echo row[0] and so on... |
|
#2
|
||||
|
||||
|
Yeah, why not?
|
|
#3
|
|||
|
|||
|
why not? because
a) i am having trouble with some of the fields like a list box, checkbox, radio buttons, ie on how to preset them with the value from databse b) it will be a long page, and it may get tedious for the user |
|
#4
|
||||
|
||||
|
Quote:
Well, if you're doing radio buttons (for example) you'd need to add some code to each radio button that said if the value selected in the database equals this radio button's value, add the selected statement, otherwise do nothing. That would only be an extra one line for each radio button. Similar processes would apply to the other fields. Quote:
If there really is a lot of stuff, split it onto different pages. |
|
#5
|
||||
|
||||
|
I don't think users would get bored or whatever. Look at something like this site here (Dev Shed) - if you want to change your details, you have a long page where you can change everything.
For the checkboxes and whatever, just have something like ... if ($queryresult == thethingrelatedtothischeckbox){echo 'checked';}.... in the appropriate place. You can use the same form as when they originally enter their details. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > editing the values by the site user? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|