Server IP : 172.16.15.8 / Your IP : 18.222.56.71 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/rlbarner/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- Pg. 180-181 Show results of updated selection in Products table. --> <HEAD> <link rel="stylesheet" type="text/css" href="mystyle.css"> </HEAD> <TITLE>Update Results</TITLE> <BODY> <H2>Update Results</H2> <HR> <?php $Product = $_POST['Product']; print "You selected $Product to decrement.<BR>"; $host = 'localhost'; $user = 'rlbarner'; $passwd = 'cs480'; $database = 'rlbarner'; $connect = mysql_connect($host, $user, $passwd); $table_name = 'Products'; $query = "UPDATE $table_name SET Numb=Numb-1 WHERE Product_desc='$Product'"; mysql_select_db($database); $results_id = mysql_query($query, $connect); if($results_id) { print "<BR>"; include("display.php"); } else die ("Update failed!<BR>"); print "<A HREF=index.html>Index</A><BR>"; ?> </BODY>