Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2. mysql_connect("localhost", "root", "") or die("Connection Failed");
  3. mysql_select_db("horse")or die("Connection Failed");
  4. $query1 = "select * from horse where active = 1";
  5. $result1 = mysql_query($query1);
  6. //while ($line1 = mysql_fetch_array($result1, MYSQL_ASSOC)) {
  7.  
  8. echo ' <div class="tabs box">
  9. <ul>
  10. ';
  11.  
  12. $count = 0; // Initialize counter
  13. while($row = mysql_fetch_array($result1, MYSQL_ASSOC)) {
  14. echo '<li><a href=\"#tab0"'. ++$count .'><span>'. $row['Name'] . '</span></a></li>';
  15.  
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement