Keeping values in a form
Posted 28 March 2006 - 07:22 PM
IE with this forum if you reload your post a topic page it keeps the values you entered in the form.
For some reason i thought it was a header() output but i forgot what and can't find it anywhere now :S.
Posted 28 March 2006 - 09:08 PM
Posted 30 March 2006 - 12:31 AM
How do you keep values in a form which someone has entered.
Generally, when the form is first submitted you save the values somewhere (a database is a good place).
And when the user goes back, you fetch the values from the database and then display the form with values in the right spots.
Is that what you mean? I have some examples of how I do something like that at [a href=\"http://www.skypaint.com/gavin/code/\" target=\"_blank\"]http://www.skypaint.com/gavin/code/[/a] ....
Posted 30 March 2006 - 01:08 AM
You can easily extend this to highlight the invalid fields by changing the CSS class of the input element.
$values = array("name" => "Jiminy", "address" => "", "Post Code" => "RM7 4RT"); <input type="text" value="<?echo $values["name"]?>" />
I'm not sure for what purpose you need them, but I just wanted to make it more convenient for users who made a mistake.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users