I am working on a survey and I am having a conceptual problem, I am not new to programming but I am new to web programming. I am trying to set up a dynamic form. I want to ask the user if they want a conference yes/no and if they said yes I want them to answer more questions about their wishes for the conference. If no I want them to go on to answer more questions about a different topic on the next page. Everything will be going into a MySQL database. How do I get it to 'trigger' a screen refresh after they say yes / no. Conceptually I am not sure how much of this should be done in PHP and HTML, right now I am trying to do it all in PHP. Any thoughts or guidance is greatly appreciated.
Can
** Excerpt of code ****
<body>
<?PHP
print("<form name=\"ConferenceSection\" method=\"post\" action=\"> ");
print("<div align=\"center\">");
print(" <center>");
print(" <table class=\"mainFrame\" cellspacing=\"0\">");
print(" <tr>");
print(" <td class=\"mainFrame2ColSpan2\" colspan=\"2\">");
print(" <p class=\"pageNumber\">Page 3 of 6</p></td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColSpan2\" colspan=\"2\" >");
print(" <p class=\"heading\">Section 1: Conference Questions</p></td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColSpan2\" colspan=\"2\">");
print(" <p class=\"spacerWhite\"></p></td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColSpan2\" colspan=\"2\">");
print(" <p class=\"questions\">CEPA is considering holding an emergency preparedness conference in 2006. We need your help to plan for this event. Please answer the following questions to help us with our planning process.</p></td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColSpan2\" colspan=\"2\">");
print(" <p class=\"spacerWhite\"></p></</td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColNumberSpan1\" valign=\"top\"><p class=\"questions\">1.</p></td>");
print(" <td class=\"mainFrame2ColQuestionSpan1\"><p class=\"questions\">Would you attend an emergency management conference in Halifax, Nova Scotia?</p></td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColNumberSpan1\"></td>");
print(" <td class=\"mainFrame2ColQuestionSpan1\">");
print(" <div align=\"left\">");
print(" <table class=\"nestFrame\" cellspacing=\"0\">");
print(" <tr>");
print(" <td class=\"nestFrame2ColButtonSpan1\"><p class=\"questions\"><input type=\"Radio\" name=\"Question1\" value=\"Yes\"><echo $Question1></p></td>");
print(" <td class=\"nestFrame2ColOptionSpan1\"><p class=\"questions\">Yes</font></td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"nestFrame2ColButtonSpan1\"><p class=\"questions\"><input type=\"Radio\" name=\"Question1\" value=\"No\"><echo $Question1></p></td>");
print(" <td class=\"nestFrame2ColOptionSpan1\"><p class=\"questions\">No</p></td>");
print(" </tr>");
print(" </table>");
print(" </div>");
print(" </td>");
print(" </tr>");
print(" <tr>");
print(" <td class=\"mainFrame2ColSpan2\" colspan=\"2\">");
print(" <p class=\"spacerWhite\">_</p></td>");
print(" </tr>");
switch($Question1) {
case 'Yes':
print(" <tr>");
print(" <td class=\"mainFrame2ColNumberSpan1\" valign=\"top\"><p class=\"questions\">2.*</p></td>");
print(" <td class=\"mainFrame2ColQuestionSpan1\"><p class=\"questions\">How many days would you be prepared to attend an emergency preparedness conference?</p></td>");
print(" </tr>");
.....
break;
}
print(" </table>");
print(" </center>");
print("</div>");
print("</form>");
?>
</body>
</html>