Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Liệt kê bài hát của album</title>
  6. </head>
  7. <body>
  8. <?php
  9. $ma=$_POST['maalbum'];
  10. include "connect.php";
  11. $str="select * from baihat where MA_ALBUM='$ma'";
  12. echo $str;
  13. $rs=mysql_query($str,$conn);
  14. echo $rs;
  15. if(mysql_num_rows($rs)>0)
  16. {
  17. echo "<h3>Danh sách các bài hát của Album </h3>";
  18. echo "<table border='1'>";
  19. $stt=1;
  20. echo "<tr><th>Số thứ tự</th><th>Tên Album</th></tr>";
  21. while($row= mysql_fetch_row($rs))
  22. {
  23. echo "<tr><td>$stt</td>";
  24. echo "<td>".$row[1]."</td>";
  25. echo "</tr>";
  26. $stt++;
  27. }
  28. }
  29. else{
  30. echo "Album này không có bài hát";
  31. }
  32. echo "</table>";
  33. ?>
  34.  
  35. </body>
  36. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement