Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con =mysql_connect('localhost', 'root');
- if(!con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_Select_db("coupons", $con);
- $manufacturer = $POST['mfg'];
- $result = mysql_query("SELECT * FROM `coupondata` WHERE `Manufacturer` = '".$manufacturer."'");
- echo"
- <html>
- <body>
- <table border='1'>
- <tr>
- <th>Manufacturer</th>
- <th>Brand</th>
- <th>Variety</th>
- <th>Size</th>
- <th>Unit</th>
- <th>Pkg</th>
- <th>Discount Amt.</th>
- <th>Exp. Date</th>
- </tr>
- ";
- while ($row = mysql_fetch_array($result))
- {
- echo"
- <tr>
- <td>". $row['Manufacturer'] ."</td>
- <td>". $row['Brand'] ."</td>
- <td>". $row['Variety'] ."</td>
- <td>". $row['Size'] ."</td>
- <td>". $row['Unit'] ."</td>
- <td>". $row['Pkg'] ."</td>
- <td>". $row['DiscAmt'] ."</td>
- <td>". $row['ExpDate'] ."</td>
- </tr>
- ";
- }
- echo "
- </table>
- </body>
- </html>
- ";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement