Hi,
I have a registration form that users use to register onto the website.
A problem I have is that during the registrtion the user must select a password and then reconfirm that password.
If for example the passwords does not match and the user click the register button, an error will be displayed which is good. BUT all the information that the user has entered like name, surname, address etc are lost.
Is it possible to keep this data from beeing lost so that the user only needs to correct the password?
Thanks
Registration From
Moderator: General Moderators
Re: Registration From
I think you are refering to saving them into sessions (only for a short time)
so that when the user inputs something into the password box the password gets saved in the session for a while...
so that when the user inputs something into the password box the password gets saved in the session for a while...
-
steel_rose
- Forum Newbie
- Posts: 15
- Joined: Thu May 13, 2010 9:17 am
Re: Registration From
Hi,
I associate the "value" attribute in the form input to create a default.
First I send the data to a script that checks the fields and, if they are correct, I put the results in a "clean data" array. If not, I create an "error messages" array and populate it with error messages.
At the end of the script, if the "error messages" array is empty the information is put (usually) in a database, otherwise the form is displayed again with the error messages on top.
The default values are associated with "clean data" array and, if something had been passed on, it will be displayed (otherwise, it will stay empty).
Let me know if this works for you.
SR
I associate the "value" attribute in the form input to create a default.
First I send the data to a script that checks the fields and, if they are correct, I put the results in a "clean data" array. If not, I create an "error messages" array and populate it with error messages.
At the end of the script, if the "error messages" array is empty the information is put (usually) in a database, otherwise the form is displayed again with the error messages on top.
The default values are associated with "clean data" array and, if something had been passed on, it will be displayed (otherwise, it will stay empty).
Code: Select all
Name: <input type ="text" name="name" maxlength="25" value="<?php echo $arrCleanData['name']?>"><br />
Let me know if this works for you.
SR