Guest User

Untitled

a guest
Oct 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?php
  6. include ('mysql_connect.php');
  7. $query = "SELECT id, strainname, author, review, source, type, looks, smell, taste, effect, potency, imagelink, DATE_FORMAT(date, '%M %d, %Y') as sd FROM strain_review";
  8. $result = @mysql_query($query);
  9.  
  10. if ($result) {
  11. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  12. echo '<p><b>'.$row['strainname'].'</b><br />
  13. '.$row['sd'].'<br />
  14. <img src="'.$row['imagelink'].'"></img>
  15. Reviewed by : <b>'.$row['author'].'</b><br />
  16. '.$row['review'].'<br />
  17. Source : <b>'.$row['source'].'</b><br />
  18. Sativa/Indica : <b>'.$row['type'].'</b><br />
  19. Growpattern : <b>'.$row['looks'].'</b><br />
  20. Smell : <b>'.$row['smell'].'</b><br />
  21. Taste : <b>'.$row['taste'].'</b><br />
  22. Effect : <b>'.$row['effect'].'</b><br />
  23. Potency : <b>'.$row['potency'].'</b><br />
  24. </p>';
  25. }
  26. } else {
  27. echo 'There are no reviews to display';
  28. }
  29. ?>
  30. </body>
  31. </html>
Add Comment
Please, Sign In to add comment