Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en-gb">
- <head>
- <meta charset="utf-8">
- <title>iSongs by Atish Khadka</title>
- <meta name="iSongs online music shop" content="An online commerce business where customers can purchase various types of music.">
- <?
- $pageTitle = 'Artists'; // Call this in your pages' files to define the page title
- ?>
- <link rel="stylesheet" href="isongs.css">
- </head>
- <body>
- <div class="container">
- <div class="header">
- <h1>iSongs</h1>
- </div>
- <div class="nav">
- <ul>
- <li><a href="index.php">Home</a></li>
- <li><a href="songs_artists.php">Songs and artists</a></li>
- <li><a href="songs_artists_dropdown.php">Artist</a></li>
- <li><a href="reg_form.php ">Register</a></li>
- <li><a href="view_customers.php">Customers</a></li>
- <li><a href="search_customer.php">Transactions</a></li>
- <li><a href="#">User guide</a></li>
- </ul>
- </div>
- <?php
- $servername = "80.82.112.181";
- $username = "15095173u2";
- $password = "15095173p2";
- $dbname = "15095173_music_db";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $conn->close();
- ?>
- <div class="content">
- <form method="POST">
- <select name='artist'>
- <option>Please select an artist</option>
- <?php
- $sql = 'SELECT * FROM artist';
- $results = $conn->query($sql);
- while($row = $results->fetch_assoc()){
- $artist_name = $row['Artist_name'];
- echo '<option value=' . $row['Artist_ID'] . '>' . $artist_name . '</option>';
- }
- ?>
- </select>
- <input type="submit" name="submit" value="Search artists songs">
- </form>
- </div>
- <div class="footer">
- <p>© <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>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement