Jump to content

Variable access from consecutive pages...


c_coder

Recommended Posts

Please help with the following...

 

On my site's registration page I have an HTML form which passes variables on to a PHP page for validating user entries. (via $_POST)

If all the entries seem valid, the same PHP page displays them back to the user for final confirmation.

From here... when the user clicks "confirm", I need the next PHP page (that carries out the entry into the database) to still have access to the $_POST variables as entered by the user 2 pages back.

 

Please help...

 

Link to comment
https://forums.phpfreaks.com/topic/98164-variable-access-from-consecutive-pages/
Share on other sites

Because, if you have validated the input for things like xss code injection (which you must), when you pass the data through a hidden field, it can be replaced after it has been validated (so you would need to keep re-validating it) or if you have not validated the input for things like xss code injection, when you pass the data through a hidden field, the xss code can be executed.

 

Edit: Passing existing data through a session will result in the quickest operating web site because you won't be sending unnecessary content to the browser just so it can send it back when the form is submitted.

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.