<?php 

echo '<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>';



include('concha.php');

if ($random == 'si') { $order = "ORDER BY rand()"; } else {$order = "ORDER BY ID"; }

mysql_connect ("$host", "$usuario", "$contra");
mysql_select_db ("$basedatos");

$sql = "SELECT * FROM mp3 $order";

$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$mp3 = $row["mp3"];
$titulo = $row["titulo"];
?>

<track>
<location><?php echo $mp3 ?></location>
<annotation><?php echo $titulo ?></annotation>
</track>

<?php }
mysql_free_result($consulta);?>
</trackList>
</playlist>