Guest User

Untitled

a guest
Feb 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3.  
  4. <body>
  5.  
  6. <?php
  7. $servername = "localhost";
  8. $username = "root";
  9. $password = "";
  10. $dbname = "learner1";
  11.  
  12. $con = mysql_connect($servername, $username, $password, $dbname);
  13.  
  14. if (!$con)
  15. die ('no sucessful connection');
  16.  
  17.  
  18. ?>
  19.  
  20.  
  21. <style>
  22. .label{
  23. color: white;
  24. padding: 5px;
  25. font-family: Ariel;
  26. background-color: #2196F3;
  27. font-size:80px;
  28. }
  29.  
  30. </style>
  31.  
  32.  
  33. <center> <span class="label">Your Profile </span>
  34. <p>
  35. <img src="logo.png" alt="our logo" width="150" height="150">
  36. </p>
  37. <table width='100%' border='1'>
  38. <tr><th> NAME:</th><th>LEVEL:</th><th>GRADE:</th></tr>
  39. <?php
  40. $query="SELECT learn-name,learn-level,learn-grade FROM learner";
  41. $result=mysql_query($query);
  42. echo "<table>";
  43. while($row=mysql_fetch_array($result)){
  44. echo "<tr><td>".$row['learn-name']."</td><td>".$row['learn-level']."</td><td>".$row['learn-grade']."</td></tr>";
  45. }
  46. echo "</table>";
  47.  
  48. mysql_close($conn);
  49. ?>
  50.  
  51. </center>
  52. </body>
  53. </html>
Add Comment
Please, Sign In to add comment