remembering registration form

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

remembering registration form

Post 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?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

usually like this

Code: Select all

<input type="text" name="fieldname"<?php
if(isset($_POST['fieldname'])){
    echo "value=\"{$_POST['fieldname']}\"";
}
?>
>
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

im not submitting it to the same page, but a processing page, therefore POST is not an option
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post 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.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post 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... :lol:
You can use POST. It will work just fine.
Post Reply