Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. mysql_connect('localhost','root','');
  2. mysql_select_db('accounts');
  3. $sql= "SELECT * FROM users1";
  4. $list=mysql_query($sql);
  5.  
  6. ?>
  7. <html>
  8. <head>
  9. <title>Welcome to ScanNShop</title>
  10. </head>
  11. <h1>Welcome to ScanNShop</h1>
  12.  
  13. <body>
  14.  
  15. <table width="600" border="1" cellpadding="1" cellspacing="1">
  16. <tr>
  17.  
  18. <th>No.</th>
  19. <th>Name</th>
  20. <th>Price</th>
  21. <tr>
  22.  
  23. <?php
  24.  
  25. while ($users1=mysql_fetch_assoc($list)) {
  26.  
  27. echo "<tr>";
  28.  
  29. echo "<td>".$users1['pid']."</td>";
  30.  
  31. echo "<td>".$users1['name']."</td>";
  32.  
  33. echo "<td>".$users1['price']."</td>";
  34.  
  35. }
  36.  
  37. ?>
  38.  
  39. </table>
  40. </body>
  41. </html >
  42.  
  43. No. Name Price
  44. 1 bread 2.00
  45. 2 milk 2.00
  46. 3 janabab 6797994.00
  47. 4 jajajsh 846494.00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement