Advertisement
Guest User

Untitled

a guest
Apr 6th, 2016
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en-gb">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>iSongs by Atish Khadka</title>
  6. <meta name="iSongs online music shop" content="An online commerce business where customers can purchase various types of music.">
  7. <?
  8. $pageTitle = 'Artists'; // Call this in your pages' files to define the page title
  9. ?>
  10. <link rel="stylesheet" href="isongs.css">
  11. </head>
  12. <body>
  13. <div class="container">
  14. <div class="header">
  15. <h1>iSongs</h1>
  16. </div>
  17. <div class="nav">
  18. <ul>
  19. <li><a href="index.php">Home</a></li>
  20. <li><a href="songs_artists.php">Songs and artists</a></li>
  21. <li><a href="songs_artists_dropdown.php">Artist</a></li>
  22. <li><a href="reg_form.php ">Register</a></li>
  23. <li><a href="view_customers.php">Customers</a></li>
  24. <li><a href="search_customer.php">Transactions</a></li>
  25. <li><a href="#">User guide</a></li>
  26. </ul>
  27. </div>
  28. <?php
  29. $servername = "80.82.112.181";
  30. $username = "15095173u2";
  31. $password = "15095173p2";
  32. $dbname = "15095173_music_db";
  33.  
  34. // Create connection
  35. $conn = new mysqli($servername, $username, $password, $dbname);
  36. // Check connection
  37. if ($conn->connect_error) {
  38. die("Connection failed: " . $conn->connect_error);
  39. }
  40.  
  41. $conn->close();
  42. ?>
  43. <div class="content">
  44.  
  45. <form method="POST">
  46. <select name='artist'>
  47. <option>Please select an artist</option>
  48. <?php
  49. $sql = 'SELECT * FROM artist';
  50. $results = $conn->query($sql);
  51.  
  52. while($row = $results->fetch_assoc()){
  53. $artist_name = $row['Artist_name'];
  54. echo '<option value=' . $row['Artist_ID'] . '>' . $artist_name . '</option>';
  55. }
  56. ?>
  57. </select>
  58. <input type="submit" name="submit" value="Search artists songs">
  59. </form>
  60.  
  61. </div>
  62. <div class="footer">
  63. <p>&copy; <a href="http://www.mmu.ac.uk/" title="MMU homepage">MMU 2016</a> | STUDENT COURSEWORK | TUTOR <a href="mailto:c.dawson@mmu.ac.uk">Chris Dawson</a> | <a href="http://validator.w3.org/check?uri=referer" title="W3C HTML Validation Service" >Valid HTML</a> </p>
  64. </div>
  65. </div>
  66. </body>
  67. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement