Jump to content

Sending $_POST vars back to the form page??


Perfidus

Recommended Posts

Hello there !

I'm sending a big a form to be stored in DDBB, after storing the user is headed by header(location:"whatever.php") to a wellcoming page, but whenever is an error on the mysql query and datas can't be stored on DDBB, I would like the user to be sended back to the form page and to find all the fields already filled by reusing the $_POST[] vars.

Is it possible? Can $_post[] array be re-sended?

Sessions are stored on a file on the server. It can hold massive amounts of data without worry. Plus it is all text, I take it, and text holds no space at all.

 

You can store it in the session as an array or as individual vars, it is up to you.

oh, and in your form input fields be sure to have something like this...

 

<input type="text" name="whatever" value="<?php echo $_POST['something']; ?>" />

 

that way, when the user is back at the form, any inputted values will be present in the input field's.

 

you can do textarea as well.

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.