Server IP : 172.16.15.8 / Your IP : 3.144.31.64 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/vnlaughlin/../kakaragiorgis/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<BODY> <BODY> <?php include 'header.php'; ?> <FONT face = papyrus> <p> <?php $index = $_POST['symptom']; $menu = array('headache', 'hangover', 'sorethroat', 'heartburn', 'weightloss', 'depression', 'insomnia', 'memory_and_concentration', 'hiccoughs', 'high_blood_pressure'); if(count($index) ==0) // no checked echo "Please go back <A HREF=search1.php> to select a symptom</A>."; else { echo "<BR>Your symptom(s) are: <p>"; $i=0; foreach ($index as $item) { $cond = "$menu[$item]"; $sym[$i]=$cond; $i++; echo "$cond <br>"; } //echo "<hr>"; } $server = 'localhost'; $user = 'wcdavis'; $pass = 'cs480'; //$mydb = ''; $table_name = 'symptoms'; print "<center><font size=4 color=blue>"; //print "<p>Table $table_name Data</font><br>"; $connect = mysql_connect($server, $user, $pass); if( !$connect ) { die ("Can't connect to $server using $user"); } else { $cond=" $sym[0]=1"; //print "<p>$cond <p>"; if($i>1) for($j=1;$j<$i; $j++) { $cond = $cond . " or $sym[$j]=1"; } $SQLcmd = "SELECT name, chinesename, linkurl FROM $table_name where $cond;"; MYSQL_select_db($mydb); $results_id = mysql_query ( $SQLcmd, $connect); if($results_id) { // p.178 print "<table border=1>"; print "<th>Point Name<th>Chinese Name<th>Link"; while($row=mysql_fetch_row($results_id)) { print "<tr>"; foreach ($row as $field) print "<td>$field</td>"; print "</tr>"; } } else echo ( "Search failed"); mysql_close($connect); } ?> <p> <a href="directions.php">How to massage these acupressure points.</a> <p><a href="search1.php">Go back to select another symptom.</a> </center> </font> </BODY>