I am doing a project for college. We have been asked to build a php page and insert a table to it WITHOUT using a database. I have it done but it keeps returning errors.
When i go to my home html page and go to drop down menu I created and choose page I want to see it should bring me to only the section I choose in the php.
Here is the code (any help really appreciated):
Expand|Select|Wrap|Line Numbers
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
- <title>Album</title>
- <link rel="stylesheet" type="text/css" href="homework.css">
- </head>
- <body>
- <?php
- // get form selection
- $day = $_GET['album'];
- // check value and select appropriate item
- if ($choice == 1) {
- $album = 'James Taylor';
- ?>
- <table>
- <tr>
- <td>
- <a href = index1.html>Back</a><br>
- <h1>Carolina On My Mind</h1>
- <h2>'Carolina On My Mind'</h2>
- <img src="images/taylor.jpg" alt="James Taylor" width="100" height="100"/>
- <p><span class="style1">Track Titles:<br />
- <h3>
- <ol>echo('1. Dont Talk Now</br>
- 2. Somethings Wrong</br>
- 3. Knockin Round The Zoo</br>
- 4. Sunshine Sunshine</br>
- 5. Taking It In</br>
- 6. Something In The Way She Moves</br>
- 7. Carolina in My Mind</br>
- 8. Brighten Your Night With My Dayecho');</ol>
- </h3>
- </span>
- <br /><iframe title="YouTube video player" width="480" height="290" src="http://www.youtube.com/embed/Gic6B-B6rpg" frameborder="0" allowfullscreen></iframe>
- </p>
- </td>
- </tr>
- </table>
- <?php
- </body>
- </html>
- }
- elseif ($choice == 2) {
- $album = 'The Rolling Stones';
- ?>
- <table>
- <tr>
- <td>
- <a href = index1.html>Back</a><br>
- <h1>The Rolling Stones </h1>
- <h2>'Symphany For The devil'</h2>
- <img src="images/stones.jpg" alt="beggars banquet - rolling stones" width="100" height="100"/>
- <p><span class="style1">Track Titles:<br />
- <h3>
- <ol>echo('1. Sympathy for the Devil</br>
- 2. No Expectations</br>
- 4. Parachute Woman</br>
- 5. Jigsaw Puzzle</br>
- 6. Street Fighting Man</br>
- 7. Prodigal Son</br>
- 8. Stray Cat Blues</br>
- 9. Factory Girl</br>
- 10. Salt of the Earth');</ol>
- </h3>
- </span>
- <br />
- <iframe title="YouTube video player" width="480" height="290" src="http://www.youtube.com/embed/iLddJ1WceHQ" frameborder="0" allowfullscreen></iframe>
- </p>
- </td>
- </tr>
- </table>
- <?php
- </body>
- </html>
- }
- elseif ($choice == 3) {
- $album = 'Sting';
- ?>
- <table>
- <tr>
- <td>
- <a href = index1.html>Back</a><br>
- <h1>The Rolling Stones </h1>
- <h2>'All This Time'</h2>
- <img src="images/allthistime.jpg" alt="All This Time - Sting" width="100" height="100"/>
- <p><span class="style1">Track Titles:<br />
- <h3>
- <ol>echo('1. A Thousand Years</br>
- 2. If You Love Somebody Set Them Free</br>
- 3. Perfect Love...Gone Wrong</br>
- 4. All This Time</br>
- 5. Seven Days</br>
- 6. The Hounds of Winter</br>
- 7. Dont Stand So Close to Me</br>
- 8. When We Dance</br>
- 9. Dienda</br>
- 10. Roxanne</br>
- 11. Every Breath You Take');</ol>
- </h3>
- </span><br />
- </span><br />
- <iframe title="YouTube video player" width="480" height="290" src="http://www.youtube.com/embed/MsLzdYR_MaQ" frameborder="0" allowfullscreen></iframe>
- </p>
- </td>
- </tr>
- </table>
- <?php
- </body>
- </html>
- }
- elseif ($choice == 4) {
- $album = 'Bob Dylan';
- ?>
- <table>
- <tr>
- <td>
- <a href = index1.html>Back</a><br>
- <h1>'Bob Dylan'</h1>
- <h2>'Hurricane'</h2>
- <img src="images/dylan.jpg" alt="Bob Dylan Desire" width="100" height="100"/>
- <p><span class="style1">Track Titles:<br />
- <h3>
- <ol>echo('1. Hurricane</br>
- 2. Isis</br>
- 3. Mozambique</br>
- 4. One More Cup of Coffee (Valley Below)</br>
- 5. Oh, Sister</br>
- 6. Joey</br>
- 7. Romance in Durango</br>
- 8. Black Diamond Bay</br>
- 9. Sara');</ol>
- </h3>
- </span><br />
- <iframe title="YouTube video player" width="480" height="290" src="http://www.youtube.com/embed/OLDSdnHWaSU" frameborder="0" allowfullscreen></iframe>
- </p>
- </td>
- </tr>
- </table>
- <?php
- </body>
- </html>
- }
- elseif ($choice == 5) {
- $album = 'Robert Plant and Jimmy Page';
- ?>
- <table>
- <tr>
- <td>
- <a href = index1.html>Back</a><br>
- <h1>Jimmy Page & Robert Plant </h1>
- <h2>'Houses Of Holy'</h2>
- <img src="images/housesofholy.jpg" alt="House of holy" width="100" height="100"/>
- <p><span class="style1">Track Titles:<br />
- <h3>
- <ol>echo('1 - The Song Remains The Same</br>
- 2 - The Rain Song</br>
- 3 - Over The Hills And Far Away</br>
- 4 - The Crunge</br>
- 5 - Dancing Days</br>
- 6 - D yer Mak er</br>
- 7 - No Quarter</br>
- 8 - The Ocean');</ol>
- </h3>
- <br /><iframe title="YouTube video player" width="480" height="290" src="http://www.youtube.com/embed/D3vs9y6CMrM" frameborder="0" allowfullscreen></iframe>
- </p>
- </td>
- </tr>
- </table>
- <?php
- </body>
- </html>
- }
- else {
- $album = 'Eric Clapton';
- ?>
- <table>
- <tr>
- <td>
- <a href = index1.html>Back</a><br>
- <h1>Eric Clapton,Jeff Beck,Jimmy Page</h1>
- <h2>"Layla"</h2>
- <img src="images/clapton.jpg" alt="Eric Clapton" width="100" height="100"/>
- <p><span class="style1">Track Titles:<br />
- <h3>
- <ol>echo('1. Signe</br>
- 2. Before You Accuse Me</br>
- 3. Hey Hey</br>
- 4. Tears in Heaven</br>
- 5. Lonely Stranger</br>
- 6. Nobody Knows You When Youre Down and Out</br>
- 7. Layla</br>
- 8. Running on Faith</br>
- 9. Walkin Blues</br>
- 10. Alberta</br>
- 11. San Francisco Bay Blues</br>
- 12. Malted Milk</br>
- 13. Old Love</br>
- 14. Rollin and Tumblin');</ol>
- </h3>
- <br />
- <iframe title="YouTube video player" width="480" height="290" src="http://www.youtube.com/embed/ICpxgxThG7s" frameborder="0" allowfullscreen></iframe>
- </span>
- <br />
- </p>
- </td>
- </tr>
- </table>
- }
- ?>
- <?php echo($track); ?>
- </body>
- </html>