Server IP : 172.16.15.8 / Your IP : 18.117.168.71 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/rlbarner/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); /** File Name: surveyactiond.php Author: Regina Barner Date: 19 February 2013 Instructor: Dr. Wang Goal: Display information inputted into survey and display results of web survey questionnaire page. */ $name = $_SESSION['yourname']; $gender = $_SESSION['gender']; $grade = $_SESSION['grade']; $course = $_SESSION['course']; $pw = $_SESSION['password']; $_SESSION['password'] = $pw; if($pw !="hw3b") print "Access denied.<BR>"; else { ?> <BODY BGCOLOR="#D9D9F3"> <TITLE>Web Survey Questionnaire Results</TITLE> <FONT FACE="Sylfaen"> <CENTER> <H2>Web Survey Questionnaire Results</H2> <HR> Thank you for taking the time to complete the course survey! <BR><BR> <?php $ans1 = $_POST['answer1']; $ans2 = $_POST['answer2']; $ans3 = $_POST['answer3']; $ans4 = $_POST['answer4']; $comments = $_POST['comments']; print "Your information:<BR>"; print "Name: <B>$name</B><BR>"; print "Gender: <B>$gender</B><BR>"; print "Grade: <B>$grade</B><BR>"; print "Course: <B>$course</B><BR><BR>"; if($ans1=="sagree") print "You <B>strongly agreed</B> to question 1.<BR>"; else if($ans1=="agree") print "You <B>agreed</B> to question 1.<BR>"; else if($ans1=="disagree") print "You <B>disagreed</B> to question 1.<BR>"; else print "Error! Maybe you didn't select an answer?<BR>"; if($ans2=="sagree") print "You <B>strongly agreed</B> to question 2.<BR>"; else if($ans2=="agree") print "You <B>agreed</B> to question 2.<BR>"; else if($ans2=="disagree") print "You <B>disagreed</B> to question 2.<BR>"; else print "Error! Maybe you didn't select an answer?<BR>"; if($ans3=="sagree") print "You <B>strongly agreed</B> to question 3.<BR>"; else if($ans3=="agree") print "You <B>agreed</B> to question 3.<BR>"; else if($ans3=="disagree") print "You <B>disagreed</B> to question 3.<BR>"; else print "Error! Maybe you didn't select an answer?<BR>"; if($ans4=="sagree") print "You <B>strongly agreed</B> to question 4.<BR>"; else if($ans4=="agree") print "You <B>agreed</B> to question 4.<BR>"; else if($ans4=="disagree") print "You <B>disagreed</B> to question 4.<BR>"; else print "Error! Maybe you didn't select an answer?<BR>"; print "<BR>Your additional comments entered were: "; for($i=0; $i<count($comments); $i++) print "<B>$comments[$i]</B>"; } ?> <HR> <A HREF=index.html>Index</A> </CENTER> </FONT> </BODY>