Jump to content

Recommended Posts

Can you post an example?

 

Every time you submit or refresh the page, you need to catch/pass the variables.

 

ok, so if on step 1 i have a field 'name' and i validate it, and now move to step 2 the value of 'name' would be there, since the page had been reloaded only once to validate the $_POST. But would be lost after the visitor submits step 2 correct?

Can you post an example?

 

Every time you submit or refresh the page, you need to catch/pass the variables.

 

ok, so if on step 1 i have a field 'name' and i validate it, and now move to step 2 the value of 'name' would be there, since the page had been reloaded only once to validate the $_POST. But would be lost after the visitor submits step 2 correct?

 

Yes it would be lost.  You can either store it in a session or a hidden field like meomike mentioned, to retain the values.

 

Yes it would be lost.  You can either store it in a session or a hidden field like meomike mentioned, to retain the values.

 

I was planning on using a session, but it's a 6 part form...It's an application, so some replies i got on here were if the user took too long to complete the steps the session would be lost. I guess my best bet is to stick them all into hidden fields after validation.

The session.gc_maxlifetime can be set anywhere - master php.ini, .htaccess file (when php is running as an Apache module), httpd.conf (Apache only), a local php.ini (when php is running as a CGI application), or even in your script, as long as it is set before every session_start() statement.

 

The session.gc_maxlifetime setting in effect when session garbage collection runs, will determine the age of the session data files that are deleted. On a shared web server using the default session.save_path, the shortest session.gc_maxlifetime setting wins. To insure that only your session.gc_maxlifetime setting affects your session data files, you must set your session.save_path to be to a folder within your accounts folder tree.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.