below is a simple switch structure that should bring up the correct next question after the user selcts from the drop down of choices. However it keep only returnig the "default" of the switch. It's I am doing something wrong in regards to sending info from the html page to the php page. Something wrong with my syntax?
Code://pass the recieved values using hidden types print("<input type=hidden name=\"FirstName\" value=\"$FirstName\">\n"); print("<input type=hidden name=\"LastName\" value=\"$LastName\">\n"); print("<input type=hidden name=\"Comments\" value=\"$Comments\">\n"); print("<input type=hidden name=\"ContactHow\" value=\"$ContactHow\">\n"); //_____make a switch for the form pulldown switch ($ContactHow) { case "Telephone": print("<b>Please enter a daytime phone number where you can be reached:</b><br>\n"); print("<input type=text name=\"Telephone\" size=10><br>"); print("<input type=submit name=submit value=\"Continue\">\n"); break; case "Mail": print("<b>Please enter your mailing address:</b><br>\n"); print("<textarea name=\"MailAddress\" rows=5 cols=40></textarea><br>\n"); print("<input type=submit name=submit value=\"Continue\">\n"); break; case "Email": print("<b>Please enter your email address:</b><br>\n"); print("<input type=text name=\"Email\" size=40><br>\n"); print("<input type=submit name=submit value=\"continue\">\n"); break; case "Fax": print("<b>Please enter your fax number</b><br>\n"); print("<input type=text name=\"Fax\" size=10><br>\n"); print("input type=submit name=submit value=\"continue\">\n"); break; default: print("<b>Please select how you want to be contacted</b><br>\n"); break; }







Bookmarks