Jump to content

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?

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.