rround
asked on
How to stop the refereshing of form fields
Hello,
I have a web form with quite a few fields (name, address etc). It's posts the data to a mysql database. When the form is filled in and there is a duplicate name, I echo a message to the user that the username already exists. However, the problem I have is with the other fields. All the info they entered (about 20 fields worth) is deleted and they have to retype them. I want the user not to have to re-fill out all the fields. How can I achieve this?
Thanks in advance.
Rob.
I have a web form with quite a few fields (name, address etc). It's posts the data to a mysql database. When the form is filled in and there is a duplicate name, I echo a message to the user that the username already exists. However, the problem I have is with the other fields. All the info they entered (about 20 fields worth) is deleted and they have to retype them. I want the user not to have to re-fill out all the fields. How can I achieve this?
Thanks in advance.
Rob.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Hamlet,
That was what I was looking for. Thanks for your input too Batalf.
Rob.
That was what I was looking for. Thanks for your input too Batalf.
Rob.
ASKER
Thanks Hamlet,
That was what I was looking for. Thanks for your input too Batalf.
Rob.
That was what I was looking for. Thanks for your input too Batalf.
Rob.
<form action="<? echo $PHP_SELF; ?>" method="post">
<table border="0">
<tr><td><p>Firstname:</td>
<tr><td><p>Address:</td><t
.. and so on
</table>
</form>
Doing this, the form would be posted to the same file, and the previous values is pretyped into the fields(eg: value="<? echo $firstname; ?>"> ).
Batalf