daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Jun 5th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <body>
  3. <table border="0" cellspacing="2" cellpadding="2">
  4. <tr>
  5. <th><font face="Arial, Helvetica, sans-serif">Value1</font></th>
  6. <th><font face="Arial, Helvetica, sans-serif">Value2</font></th>
  7. <th><font face="Arial, Helvetica, sans-serif">Value3</font></th>
  8. <th><font face="Arial, Helvetica, sans-serif">Value4</font></th>
  9. <th><font face="Arial, Helvetica, sans-serif">Value5</font></th>
  10. </tr>
  11.  
  12.  
  13. <?php
  14. $username="totally_bob";
  15. $password="bob1";
  16. $database="totally_catalogue";
  17.  
  18. mysql_connect(localhost,$username,$password);
  19. @mysql_select_db($database) or die( "Unable to select database");
  20. $query="SELECT * FROM products";
  21. $result=mysql_query($query);
  22.  
  23. $num=mysql_numrows($result);
  24.  
  25. mysql_close();
  26.  
  27. echo "<b><center>Database Output</center></b><br><br>";
  28.  
  29. $i=0;
  30. while ($i < $num) {
  31.  
  32. $first=mysql_result($result,$i,"product_id");
  33. $last=mysql_result($result,$i,"product_artist");
  34. $phone=mysql_result($result,$i,"product_artist2");
  35. $mobile=mysql_result($result,$i,"product_format");
  36. $fax=mysql_result($result,$i,"product_title");
  37. $email=mysql_result($result,$i,"product_label");
  38. $web=mysql_result($result,$i,"product_condition");
  39. $i++;
  40. ?>
  41.  
  42. <tr>
  43. <td><font face="Arial, Helvetica, sans-serif"><?php echo $first;?></font></td>
  44. <td><font face="Arial, Helvetica, sans-serif"><?php echo $phone $last; ?></font></td>
  45. <td><font face="Arial, Helvetica, sans-serif"><?php echo $mobile; ?></font></td>
  46. <td><font face="Arial, Helvetica, sans-serif"><?php echo $fax; ?></font></td>
  47. <td><font face="Arial, Helvetica, sans-serif"><?php echo $web;?></font></td>
  48. </tr>
  49. }
  50.  
  51. ?>
  52.  
  53. </table>
  54. </body>
  55. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top