PHP Code:
<?php
$query = "SELECT * FROM audio ORDER BY type DESC LIMIT 0,50";
$result = mysql_query($query);
$numofrows = mysql_num_rows($result);
while($row = mysql_fetch_array($result)) {
print'
<tr>
<td class="sched" align="center"> : </td>
<td class="mainindex" align="center">'.$row["song"].'</td>
<td class="mainindex" align="center">'.$row["type"].'</td>';
$songs = array("".$row['song']."");
foreach($songs AS $song) {
print'
<td class="mainindex" align="center"><a href="lyrics.php?song='.urlencode($song).'">Lyrics</a></td>
</tr>';
}
}
?>
THAT IS THE audio.php page
PHP Code:
<?php
if(isset($_GET['song']) && in_array($_GET['song'], $song)) {
$id = urldecode($_GET['song']);
$query = ("SELECT lyrics FROM audio WHERE id='$id'") or die(mysql_error());
$result = mysql_query($query);
$numofrows = mysql_num_rows($result);
if($numofrows > 0) {
while($row = mysql_fetch_array($result)) {
print '
<tr>
<td class="mainindex">'.$row["lyrics"].'</td>
</tr>';
}
} else {
print 'No lyrics found.';
}
}
?>
can u tell me what to change here
?
Bookmarks