basic-php-15-getprod.php / php
<?php session_start(); //connect to the database - either include a connection variable file //or type the following lines: //make our database active mysql_select_db("ecommerce"); //get our variable passed through the URL prodid = //get information on the specific product we want query = "SELECT * FROM products WHERE products_prodnum='results = mysql_query(row = mysql_fetch_array(row); ?> <html> <head> <title><?php echo </title> </head> <body> <div align="center"> <table cellpadding="5" width="80%"> <tr> <td>PRODUCT IMAGE</td> <td><strong><?php echo products_name; ?></strong><br> <?php echo <br \> <br>Product Number: <?php echo products_prodnum; ?> <br>Price: <?php echo products_price; ?><br> <form method="POST" action="modcart.php?action=add"> Quantity: <input type="text" name="qty" size="2"><br> <input type="hidden" name="products_prodnum" value="<?php echo <input type="submit" name="Submit" value="Add to cart"> </form> <form method="POST" action=<cart.php>> <input type="submit" name="Submit" value="View cart"> </form> </td> </tr> </table> <hr width="200"> <p><a href=<cbashop.php>>Go back to the main page</a></p> </div> </body> </html>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.