Server IP : 172.16.15.8 / Your IP : 18.216.174.32 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/kahenry/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- Author: Kenneth Henry Instructor: Dr. Wang Due: March 6, 2022 Goal: Based on the Tuna Cafe Survey taught in the class, create a modified form, survey.php by adding more questions that ask the user to check what he or she likes about the service. That is, add a separate part (using horizontal line <HR>) in the form with check box items that include the following responses: a. The marvelous food preparation. b. The affordable prices. c. The speedy services. d. Just like tuna. e. None of the above. When submitting the check boxes form, output the user's selections from the form-handling script in a bullet list (using <UL> </UL>). Make sure that you output a message if the user fails to select anything. --> <center> <FONT color=orange size=3> <H2> Tuna Cafe Survey </H2> </center> <HR> <FORM action=tunasurvey2.php method=post> <?php $menu = array("Tuna Casserole", "Tuna Sandwich", "Tuna Pie", "Grilled Tuna", "Tuna Surprise"); $bs = 1; print "Please indicate your favorite - <BR>"; for($i=0; $i<count($menu); $i++) { print "<INPUT TYPE=checkbox name=prefer[] value=$i> $menu[$i]"; if($i == $bs) print "<B><FONT color=red> Best seller! </FONT> </B>"; print "<BR>"; } ?> <HR> <?php $menu2 = array("a. The marvelous food preparation.", " b. The affordable prices." , "c. The speedy services." , "d. Just like tuna." , "e. None of the above."); $bs=1; print "Check what you like about the service - <BR>"; for($i=0; $i<count($menu2); $i++) { print "<INPUT TYPE=checkbox name=prefer2[] value=$i> $menu2[$i]"; print "<BR>"; } ?> <p> <INPUT type=submit value=Submit> <INPUT type=reset value=Reset> </FORM> </FONT>