Page is a not externally linkable
weddingm - 4:54 am on Mar 10, 2011 (gmt 0)
I just can't quite get it working. The following code shows all the songs instead of just 1 ?
$songquery="SELECT * from db WHERE lyrics !='NONE'";
$songqueryresult=mysql_query($songquery);
while($songrowdata=mysql_fetch_array($songqueryresult))
{ $song=$songrowdata['song'];
$artist=$songrowdata['artist'];
$lyrics=$songrowdata['lyrics'];
$songs[]="".$song."<br />".$artist."<br /><a href='http://www.sample.com/".$lyrics."'>Lyrics</a>";
srand((double) microtime() * 1000000);
$randomsong=rand(0, (count($songs)-1));
echo "<p>".$songs[$randomsong]."</p>";
}