H
Hasnaat M
Guest
Okay, so my website was coded in HTML, but i've managed to convert it to php (php headers, main content etc)
Anyway, on each band page, I have download links for each track.
HTML form.
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="480" height="30">Full interview session</td>
<td width="70" height="30">42.8mb</td>
<td width="30" height="30"><a href="mp3s/4dw_session.mp3" target="_blank"><img src="/artists/download.png" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Coloured In Cassettes</td>
<td height="30">3.1mb</td>
<td width="30" height="30"><a href="mp3s/coloured_in_cassette.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Don't Shoot The Messenger</td>
<td height="30">3.6mb</td>
<td width="30" height="30"><a href="mp3s/dont_shoot_the_messenger.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Golden Souls</td>
<td height="30">2.8mb</td>
<td width="30" height="30"><a href="mp3s/golden_souls.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">McDonalds</td>
<td height="30">2.5mb</td>
<td width="30" height="30"><a href="mp3s/mcdonalds.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Mr. Brightside (The Killers Cover)</td>
<td height="30">3.3mb</td>
<td width="30" height="30"><a href="mp3s/mr_brightside.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Remember The Dropout</td>
<td height="30">4.0mb</td>
<td width="30" height="30"><a href="mp3s/remember_the_dropout.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Tonight</td>
<td height="30">3.4mb</td>
<td width="30" height="30"><a href="mp3s/tonight.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
But since I'm trying to make it more dynamic and efficient, I've opted for a php method.
I have a file called details.php that will be in each band folder. They track names are kept in an array, as are the file locations.
$song=array("Full Session", "Coloured In Cassettes", "Don't Shoot The Messenger", "Golden Souls", "McDonalds", "Mr. Brightside (The Killers Cover)", "Remember The Dropout", "Tonight");
$file=array("mp3s/4dw_session.mp3","mp3s/coloured_in_cassettes.mp3", "mp3s/dont_shoot_the_messenger.mp3", "mp3s/golden_souls.mp3", "mp3s/mcdonalds.mp3", "mp3s/mr_brightside.mp3", "mp3s/remember_the_dropout.mp3", "mp3s/tonight.mp3");
So where I have my current HTML, I have this code.
<?php
$result = count($song)
for ($i=1; $i<=$result; $i++)
{
echo echo '<tr>
<td width="480" height="30">' . $song['$i'] .'</td>
<td width="70" height="30">' . filesize($file['$i']) . ' bytes</td>
<td width="30" height="30"><a href="'. $file['$i']) .'" target="_blank"><img src="/artists/download.png" width="21" height="21" border="0"></a></td>
</tr>';
}
?>
Can anyone tell me what is wrong with it?
Thanks in advance.
Anyway, on each band page, I have download links for each track.
HTML form.
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="480" height="30">Full interview session</td>
<td width="70" height="30">42.8mb</td>
<td width="30" height="30"><a href="mp3s/4dw_session.mp3" target="_blank"><img src="/artists/download.png" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Coloured In Cassettes</td>
<td height="30">3.1mb</td>
<td width="30" height="30"><a href="mp3s/coloured_in_cassette.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Don't Shoot The Messenger</td>
<td height="30">3.6mb</td>
<td width="30" height="30"><a href="mp3s/dont_shoot_the_messenger.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Golden Souls</td>
<td height="30">2.8mb</td>
<td width="30" height="30"><a href="mp3s/golden_souls.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">McDonalds</td>
<td height="30">2.5mb</td>
<td width="30" height="30"><a href="mp3s/mcdonalds.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Mr. Brightside (The Killers Cover)</td>
<td height="30">3.3mb</td>
<td width="30" height="30"><a href="mp3s/mr_brightside.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Remember The Dropout</td>
<td height="30">4.0mb</td>
<td width="30" height="30"><a href="mp3s/remember_the_dropout.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
<tr>
<td height="30">Tonight</td>
<td height="30">3.4mb</td>
<td width="30" height="30"><a href="mp3s/tonight.mp3" target="_blank"><img src="/artists/download.png" alt="" width="21" height="21" border="0"></a></td>
</tr>
But since I'm trying to make it more dynamic and efficient, I've opted for a php method.
I have a file called details.php that will be in each band folder. They track names are kept in an array, as are the file locations.
$song=array("Full Session", "Coloured In Cassettes", "Don't Shoot The Messenger", "Golden Souls", "McDonalds", "Mr. Brightside (The Killers Cover)", "Remember The Dropout", "Tonight");
$file=array("mp3s/4dw_session.mp3","mp3s/coloured_in_cassettes.mp3", "mp3s/dont_shoot_the_messenger.mp3", "mp3s/golden_souls.mp3", "mp3s/mcdonalds.mp3", "mp3s/mr_brightside.mp3", "mp3s/remember_the_dropout.mp3", "mp3s/tonight.mp3");
So where I have my current HTML, I have this code.
<?php
$result = count($song)
for ($i=1; $i<=$result; $i++)
{
echo echo '<tr>
<td width="480" height="30">' . $song['$i'] .'</td>
<td width="70" height="30">' . filesize($file['$i']) . ' bytes</td>
<td width="30" height="30"><a href="'. $file['$i']) .'" target="_blank"><img src="/artists/download.png" width="21" height="21" border="0"></a></td>
</tr>';
}
?>
Can anyone tell me what is wrong with it?
Thanks in advance.