Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php
  2. $con = mysql_connect('localhost','root');
  3. if (!$con)
  4. {
  5. die('Could not connect: ' . mysql_error());
  6. }
  7. mysql_select_db("Coupons", $con);
  8. $mfg='Yoplait';
  9. $result = mysql_query("SELECT * FROM `Manufacturers` WHERE `Manufacturer` = '". $mfg ."'");
  10. echo "
  11. <html>
  12. <body>
  13. <table border='1'>
  14. <tr>
  15. <th>Manufacturer</th>
  16. <th>URL</th>
  17. <th>Mfg_Code</th>
  18. </tr>
  19. ";
  20. while ($row = mysql_fetch_array($result))
  21. {
  22. echo "
  23. <tr>
  24. <td>". $row['Manufacturer'] ."</td>
  25. <td>". $row['Mfg_URL'] ."</td>
  26. <td>". $row['Mfg_Code'] ."</td>
  27. </tr>
  28. ";
  29. }
  30. echo "
  31. </table>
  32. </body>
  33. </html>
  34. ";
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement