AJAX Sticky Form and PHP Sessions
Wednesday, April 15th, 2009Sticky forms are so called because the data a user inputs into the form “sticks”. The problem with a standard web form is that the data inputted will only remain on the form until the form page is either refreshed or moved away from. This can lead to frustration for a user who has filled out a form but then decides to visit another page before returning to find they need to fill in every field of the form again.
Sticky forms give the user the freedom of moving around the site, knowing whatever actions they have taken on a form will still be there when they return. Using PHP sessions and cookies we can also store that information for use on forms on other pages or for when they visit the site at a later date.
In this tutorial we’re going to look at making sticky forms that will capture data in a PHP session. We’ll also use AJAX to make each field on our form save the data into a session as soon as that field loses focus.























