Page 1 of 1

Registration form in four steps

Posted: Wed Sep 01, 2004 10:02 am
by cubeltd4
Hello Folks,

I'm working on a registration form in 4 steps for my website. But i'm having some problems.

In step1 people can choose their country but when they select a country i use a submit(); to submit the form to file 2 pwizard2.php then i'll check their if they submitted the form via the button if not i'll get them back to file 1 pwizard1.php but the prob is i get not then the $_POST files to check which country they have choosed so i can get the correct states for the country.

Thats my big problem i want when they choosed another country the states are filled with the correct states for the country they choosed.
But i don't want to work via javascript. Thats why i need to fix a solution in step2 they can back to step1 but the values they filled in the fields must be saved.

Well if you don't understand what i mean please let me know i'll give it a try to explain it better :)

Posted: Wed Sep 01, 2004 10:10 am
by feyd
use sessions to save the data of the post in the second script/page so they can be prepopulated on the first script/page.

Posted: Wed Sep 01, 2004 10:20 am
by Draco_03
There's also a IE fix for IE 6

Code: Select all

session_start();
header("Cache-control: private"); //IE 6 fix

Posted: Wed Sep 01, 2004 10:36 am
by cubeltd4
Thanks i'll give it a try with session. Is this also possible to mak an session array?

Posted: Wed Sep 01, 2004 10:56 am
by feyd
session data is an array. yes.

Posted: Wed Sep 01, 2004 11:28 am
by cubeltd4
thanks it works now fine. It's a great place here :)

Posted: Thu Sep 02, 2004 9:27 am
by cubeltd4
Little question is it possible to put the value from a file field in a variable? I'm working with 4 steps and in step 2 people can upload 4 images but i want everything should only happen at step 4 when they finished everything else.

Posted: Thu Sep 02, 2004 10:27 am
by feyd
you can use javascript to read the filename they put into the file fields, however you cannot prefill a file field or differ the upload for later.

Posted: Thu Sep 02, 2004 12:38 pm
by m3mn0n
Yep.

Set whatever the value of the file field is, into a hidden textfield. And then parse that for processing on the next page.

If you google search for some [google]javascript form text field auto-fill snippet[/google], you should find just what you need.