Server IP : 172.16.15.8 / Your IP : 3.21.248.105 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 (0705) : /home/kakaragiorgis/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php $passwd = $_POST['passwd']; if($passwd==CS480) { ?> <BODY> <FONT face=papyrus> <CENTER><H2>Insert a Record into the Database</H2></center> <FORM action="insertaction.php" method=POST> <hr> <b>What is the name of the pressure point?</b><br> <INPUT type=text name=Pname><p> <b>What is the chinese name of the pressure point?</b><br> <INPUT type=text name=Cname><p> <b>Please select the symptoms associated with this point:</b> <BR> <INPUT type=checkbox name=symptom[] value=0> Headache<BR> <INPUT type=checkbox name=symptom[] value=1> Hangover<BR> <INPUT type=checkbox name=symptom[] value=2> Sore Throat<BR> <INPUT type=checkbox name=symptom[] value=3> Heartburn<BR> <INPUT type=checkbox name=symptom[] value=4> Weightloss<BR> <INPUT type=checkbox name=symptom[] value=5> Depression<BR> <INPUT type=checkbox name=symptom[] value=6> Insomnia<BR> <INPUT type=checkbox name=symptom[] value=7> Memory & Concentration<BR> <INPUT type=checkbox name=symptom[] value=8> Hiccoughs<BR> <INPUT type=checkbox name=symptom[] value=9> High Blood Pressure<BR><p> <?php $host = 'localhost'; $user = 'wcdavis'; $pass = 'cs480'; $database = 'wcdavis'; $connect = mysql_connect($host, $user, $pass); $table_name = 'symptom'; // p.172 $query = "insert into $table_name values (0, '$item', $cost, $weight, $quantity)"; // debug print "The query is <i> $query </i>"; mysql_select_db($database); if(mysql_query($query, $connect)) print "Insert successful.<P>"; else print "Insert failed.<P>"; mysql_close($connect); ?> <INPUT type=submit name=submit> <INPUT type=reset name=reset> <?php } else { echo "Wrong Password. <A HREF=acupressureindex.html>Back to the Homepage?</A>"; } ?> </FONT> </BODY>