Page 1 of 1
remembering registration form
Posted: Tue Apr 18, 2006 2:05 pm
by malcolmboston
I am creating a reg form and basically if the user fails to register correctly it sends them back to the error page with an error message, all the fields are blank, i always assumed the browser remembered what the user input, obviously not...
How is this normally done?
Posted: Tue Apr 18, 2006 2:09 pm
by s.dot
usually like this
Code: Select all
<input type="text" name="fieldname"<?php
if(isset($_POST['fieldname'])){
echo "value=\"{$_POST['fieldname']}\"";
}
?>
>
Posted: Tue Apr 18, 2006 2:10 pm
by malcolmboston
im not submitting it to the same page, but a processing page, therefore POST is not an option
Posted: Tue Apr 18, 2006 4:27 pm
by Benjamin
I always place the processing code on the same page as the form for this reason. Your other option is to store it all in cookies or a session, not a good idea for passwords and the like.
Posted: Tue Apr 18, 2006 5:00 pm
by Oren
malcolmboston wrote:im not submitting it to the same page, but a processing page, therefore POST is not an option
And why isn't POST an option? No reason...
You can use POST. It will work just fine.