yo
ive got a file called test.php and when the user opens it they are presented with some links which go to test.php?url=*REALMEDIANAME* for example test.php?url=foamo.rm
ive then got my embed code for the real media
PHP Code:
<embed src="<? echo $url; ?>" width="321" height="71" autostart="true"></embed></p>
and it should echo the ?url=foamo.rm, it echos it fine but it only echos the first audio in the database (it echos id 1)
below is my code anyone know why it doesnt work?
cheers
PHP Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$username = "adam123";
$pass = "adam123";
mysql_connect("localhost", "$username", "$pass");
mysql_select_db("salaciou_audio");
$select = "SELECT * FROM `audio`";
$result= mysql_query($select);
while($data = mysql_fetch_array($result)){
$url= $data["url"];
$title= $data["title"];
echo "
<a href='test.php?url=$url'>Play $title</a><br>
";
}
?>
<p>
<embed src="<? echo $url; ?>" width="321" height="71" autostart="true"></embed></p>
</body>
</html>