Advertisement
Guest User

Untitled

a guest
Jul 15th, 2011
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. <?php
  2. $connection = mysql_connect("localhost", "root", "password") or die("Error connecting to database");
  3. mysql_select_db("radio1", $connection);
  4. $result = mysql_query("SELECT *, TIME_FORMAT(airtime, '%h:%i') `airtime` FROM presenters1;", $connection) or die("error querying database");
  5.  
  6.  
  7. $i = 0;
  8. while($result_ar = mysql_fetch_assoc($result)){
  9. ?>
  10. <div class="divider"></div>
  11. <div class="main" style="width:552px;">
  12. <img src="<?php echo $result_ar['image']; ?>" width=115 height=60>
  13. <div class="time"><?php echo $result_ar['airtime']; ?></div>
  14.  
  15. <div class="show"><h3><b>
  16. <?php
  17. if ( empty( $result_ar['link'] ) ) {
  18. echo $result_ar['presenter'];
  19. }
  20. else {
  21. echo '<a href="' . $result_ar['link'] . '">' . $result_ar['presenter'] . '</a>';
  22. }
  23. ?>
  24. </b></h3>
  25.  
  26.  
  27.  
  28.  
  29. <p><?php echo $result_ar['showinfo']; ?></p></div>
  30. <div class="footer"></div>
  31. </div>
  32. <?php
  33. $i+=1;
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement