Jump to content

question about passing values


tefuzz

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.