Quotes (form systems) that have multiple forms can be a nightmare for a PHP programmer. You have to deal with data carry-over in addition to secure data storage. And these are only programming troubles, not counting quote lightness (in terms of easy and understandable content and questions) and design that makes it perfect.
Yes, I know that nothing is perfect, but in Foliovision we try to make it like that. Making the web work for you and all that.
To ensure the carry-over of data, you have two choices: 1. to use some hidden inputs in forms (therefore using post data to maintain client recognition), or 2. introduce sessions (using cookies). The first solution may be preferred, but in big CMS like Joomla, Drupal or WordPress may be almost impossible to do.
In Foliovision we use WordPress and to specifically to manage forms we use John Godley’s Filled-In (some Filled-In trivia: Filled-In was originally coded for Foliovision clients and the betas were very bloody – since then Filled-In has become a fantastic tool). Since Filled-in stores the data as one request maintaining hidden inputs between form pages is not possible.
The only solution for us was to use PHP session. We created some useful extensions for Filled-In to make such a quote systems possible. But then we ran into a problem with quote that started on HTTP and continued to HTTPS. When changing from one protocol to another, PHP session is not carried over.
There are two solutions on how to fix this. You can redirect to a link that will contain session ID as GET parameter and then start session with that ID on HTTPS (terribly insecure), or you make the whole quote use HTTPS. Of course second solution is preferred, since it’s a lot more secure way to run your site.
If you’ll work with sessions and experience similar problem remember that sessions are not carried-over when switching protocols, or from www.domain.com to domain.com. You need to pay a lot of attention to detail.
Leave a Reply