Re: Form variables vs Sessions

From: Date: Wed, 30 Oct 2002 05:00:25 +0000
Subject: Re: Form variables vs Sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121987@lists.php.net to get a copy of this message
Follow your instincts and do some research into sessions. I've put enormous amounts of data into sessions before on high-traffic sites without much trouble. You need to have the memory for it, of course, but it takes a lot of form data to equate to any significant amount. Chances are you'll be just fine. Also, consider that the more data you have in the session, the less data you're passing along in every single request and every single response. You might notice some significant performance improvements. Chris John W wrote:
I am having a problem with a form system that I am developing. It is a multi page form with over a hundred different possible variables. The problem that I'm having is that when a user enters invalid data on one page and then submits to the next page I want that page to go back to the previous page with the form fields already filled in. Currently I have the form going to the previous page with a custom error message, but am having a problem with getting the fields filled in. I pass the variables from page to page by using PHP to convert them to hidden form fields. I have considered using sessions but am concerned with the high overhead due to the number of variables. Any help with this problem would be greatly appreciated.


« previous php.general (#121987) next »