How can I setup a 2 step form were someone fills out just some basic info than they click next and ask for just a little more info than emails it. I know its like a contact form. I know how to do a single page contact form. I want to do something like this here.. Thanks any advice be cool
You'll need a script to do this easily. You can save the information in the path when they press submit on the first page, then just add the information on the second page.
Could do something like such: <?php if( !isset( $_GET[ "step" ] ) || $_GET[ "step" ] == 0 ) { ?> Step 1. <form> <input type="hidden" name="step" value="1"> [ enter the rest of the form stuff here ] </form> <?php } elseif( $_GET[ "step" ] == 1 ) { ?> <?php // Catch all of the post variables from the previous form $_POST[ "p1_input1" ] == $p1_input1; $_POST[ "p1_input2" ] == $p1_input2; ?> Step 2. <form> <input type="hidden" name="step" value="2"> <input type="hidden" name="input1" value="<?php echo $p1_input1; ?>"> <input type="hidden" name="input2" value="<?php echo $p1_input2; ?>"> [ enter the rest of the form stuff here ] </form> <?php } elseif( $_GET[ "step" ] == 2 ) { <?php // Catch all of the post variables from Page 1 $_POST[ "p1_input1" ] == $p1_input1; $_POST[ "p1_input2" ] == $p1_input2; // Catch all of the post variables from Page 2 $_POST[ "p2_input1" ] == $p2_input1; $_POST[ "p2_input2" ] == $p2_input2; // Do whatever you want here mysql_query( "blah blah" ); mail( $blah, $blah, $blah, $blah ); die( ); // Etc. ?> <?php } ?> PHP: Hope it helps.
The normal way it is done is exactly the way Xtrm2Matt has shown. Just pass them to the next form and include the data in hidden fields. Re's Rob Whisonant