Jump to content

[SOLVED] put post data into a session then recall it?


jesushax

Recommended Posts

hi all what i want to do is for for errors

 

my form goes to register.php and then if a field isnt filled in the page gets redirected back to regform.php but the information the user already inputted is lost

 

so what i want to do is gather the post data in a session then if where redirected call the session and repopulate the form with the data the user just inputted

 

anyone know how i can do this, would it be using arrays?

 

thanks

One way is to use one script and keep posting to itself which is what I do.

 

In your case try making hidden fields

<input type="hidden" name="username" value ="joebloggs">

Use that on the page that doesn't contain your form so you can remember the data.

 

You can also use session variables.

hmm the hidden fields thing i couldnt use because using a header(location:..) code after html causes problems, has done for me in the past anyway

 

could i not put all the form data into one session

 

then use an array on the regform to split the session data?

 

just how would i do it?

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.