Advertisement
Guest User

Untitled

a guest
Jun 21st, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2. $user ="root";
  3. $pass ="";
  4. $serer="localhost";
  5. $dbname="pekok";
  6. mysql_connect($serer,$user,$pass) or die(mysql_error());
  7. mysql_select_db($dbname) or die(mysql_error());
  8. ?>
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12. <title>
  13. Lihat
  14. </title>
  15. </head>
  16. <body><center>
  17. <table border="1" style="border-color: blue;">
  18. <tr>
  19. <th>Username </th>
  20. <th>Password </th>
  21. </tr>
  22. <td>
  23. <?php $query=mysql_query("SELECT * FROM user");
  24. $hasil =mysql_query($query);
  25. while ($data mysql_fetch_array($hasil)) {
  26. $id=$data['id'];
  27. echo "<td> ".$data['username']."</td>";
  28. }
  29. ?>
  30. </td>
  31. </table></center>
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement