yoyo Posted June 28, 2007 Share Posted June 28, 2007 So i have a php that has a 6 statements that i want a user to answer yes or no to. If hey answer yes to all they will be directed to step2.php else if they answer 'no' to any one of the statements they will be directed to sorry.htmlThis what i currently haveIts on line http://www.dwyse.com/php/oz/site/step1.php<form id="form1" name="form1" method="post" action="step2-1.php"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="444"> </td> <td width="245"> </td> </tr> <tr> <td width="444"><h5>The amount to be financed is $5,000 or more</h5></td> <td width="245"><p><span id="RadioWidget"> Yes <input type="radio" name="Q1" value="yes"> No <input type="radio" name="Q1" value="no"> <span class="radioRequiredMsg">Please make a selection. </span> </span> </p></td> </tr> <tr> <td width="444"><h5>You are an Australian citizen or have an approved working visa</h5></td> <td width="245"><p><span id="RadioWidget"> Yes <input type="radio" name="Q2" value="yes"> No <input type="radio" name="Q2" value="no"> <span class="radioRequiredMsg">Please make a selection. </span> </span> </p></td> </tr> <tr> <td width="444"><h5>You are not currently bankrupt</h5></td> <td width="245"><p><span id="RadioWidget"> Yes <input type="radio" name="Q3" value="yes"> No <input type="radio" name="Q3" value="no"> <span class="radioRequiredMsg">Please make a selection. </span> </span> </p></td> </tr> <tr> <td width="444"><h5>You do not have any unpaid defaults</h5></td> <td width="245"><p><span id="RadioWidget"> Yes <input type="radio" name="Q4" value="yes"> No <input type="radio" name="Q4" value="no"> <span class="radioRequiredMsg">Please make a selection. </span> </span> </p></td> </tr> <tr> <td width="444"><h5>You are over 18 years of age</h5></td> <td width="245"><p><span id="RadioWidget"> Yes <input type="radio" name="Q5" value="yes"> No <input type="radio" name="Q5" value="no"> <span class="radioRequiredMsg">Please make a selection. </span> </span> </p></td> </tr> <tr> <td width="444"><h5>You have a current drivers licence</h5></td> <td width="245"><p><span id="RadioWidget"> Yes <input type="radio" name="Q6" value="yes"> No <input type="radio" name="Q6" value="no"> <span class="radioRequiredMsg">Please make a selection. </span> </span> </p></td> </tr> <tr> <td width="444"> </td> <td width="245"><input type="submit" name="submit" id="submit" value="Submit" /> </td> </tr> </table> </form>when you submit the for you are taken to step1-2.php <?php$Q1 = $_POST['Q1'];$Q2 = $_POST['Q2'];$Q3 = $_POST['Q3'];$Q4 = $_POST['Q4'];$Q5 = $_POST['Q5'];$Q6 = $_POST['Q6'];if($Q1 || $Q2 || $Q3 || $Q4 || $Q5 || $Q6 =="no"){ header( "Location: http://www.dwyse.com/php/oz/site/sorry.html"); } else { header("Location: http://www.dwyse.com/php/oz/site/step2.php"); }?>If someone could help me out i would be very greatful Link to comment Share on other sites More sharing options...
justsomeguy Posted June 28, 2007 Share Posted June 28, 2007 You need to expand out the if statement, it doesn't work like that. if($Q1 == "no" || $Q2 == "no" || $Q3 == "no" || $Q4 == "no" || $Q5 == "no" || $Q6 == "no"){ Link to comment Share on other sites More sharing options...
yoyo Posted June 28, 2007 Author Share Posted June 28, 2007 thank you so much!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.