|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||||||
|
||||||||
|
Update form
Didn't know whether to put this in the HTML forum or not, probbaly should have done, but here goes...
I have a form where the user enters their email address. The PHP script checks if the address exists in the MySQL database and if it does, pulls all the information and displays it in text boxes where the user should be able to amend their details. So basically I am doing... php Code:
etc... Then I am using Code:
<input type="text" name="sub_firstname" value="<?php echo $firstname ?>"> The problem is (and this may be obvious), that when the user updates any of their details and clicks the button, the details don't get updated! To update their details I am using php Code:
The confirmation page displays the updated details, but the database still shows the old details. No errors are being reported. Can anyone shed any light? |
|
#2
|
|||||
|
|||||
|
RE: Update form
Try this:
php Code:
|
|
#3
|
|||
|
|||
|
RE: Update form
I think the code for the mysql update is correct. I was under the impression that the text box was keeping it's initial value (...value="<?php echo $firstname ?>") which is why i didn't know whether to put it in the HTML forum.
Is this not the case? |
|
#4
|
|||
|
|||
|
RE: Update form
I'm not too sure. I figured it might be the Update statement. You did say that the Confirmation form was showing the updated result but your Database was not. My assumption was that it wasn't connecting to update. I could be wrong though I doubt it.
|
|
#5
|
|||||
|
|||||
|
RE: Update form
It's just that my connection statement is specified just above the code I posted ...
php Code:
so really this is doing the same as |
|
#6
|
|||
|
|||
|
RE: Update form
Oh well then It might be an HTML problem like you think. HTML really isn't my thing. Sorry I wasn't able to help.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Update form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|