PHP: How to post to more then one page with if statements

lontong

New Member
Ok, here's my ordeal; I'm hoping someone can point me in the right direction here. I've got a form which is a multi-page php wizard but each subsequent page is dependent upon the chosen option in a select box. I have it redirecting to the appropriate page when clicking submit based on the selection but the information is not being posted to the page. So my question is how can I post to both pages so that which ever one is loaded next can have the information entered in the previous. Here is an example of my current code.\[code\]<html><head></head><body><?php//let's start the sessionsession_start();//now, let's register our session variablessession_register('info from last page');//finally, let's store our posted values in the session variables$_SESSION['info from last page'] = $_POST['info from last page'];echo $_SESSION["info from last page"];//redirect to appropriate page based on selected option function redirect($where){ header("Location: $where"); } if ($_REQUEST['audio'] == 'option1'){ redirect('http://www.avwebcasting.com/ordering_system/webcast/step3ressless.php'); }elseif($_REQUEST['audio'] == 'option2'){ redirect('http://www.avwebcasting.com/ordering_system/webcast/step3oa.php'); } ?><form method="post" id="step2" name="step2" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"><label><span>*Audio:</span><select name="audio" class="select"><option value="http://stackoverflow.com/questions/3689007/option1" selected="selected">option1</option><option value="http://stackoverflow.com/questions/3689007/option2">option2</option></select></label> <INPUT TYPE="submit" name="submit"/></body></html>\[/code\]
 
Back
Top