need help with an error msg (i'm new on php)
Posted: Fri Mar 21, 2008 5:25 pm
I'm trying to read a DB and generate a XML file to later read it in another aplication but I'm getting the following msg :
Parse error: syntax error, unexpected T_DNUMBER, expecting ',' or ';' in /home/radiobor/public_html/playlist.php on line 13
I have no idea what that means.
***** PLEASE MAKE READABLE POSTS AND USE THE CODE TAG ******
Parse error: syntax error, unexpected T_DNUMBER, expecting ',' or ';' in /home/radiobor/public_html/playlist.php on line 13
I have no idea what that means.
***** PLEASE MAKE READABLE POSTS AND USE THE CODE TAG ******
Code: Select all
<?php
$con = mysql_connect("localhost");
if (!$con)
{
echo "'Could not connect: ' . mysql_error()";
}
mysql_select_db("radiobor_radio", $con);
$query = "SELECT songs.url_song,artist.description,songs.description,songs.url_art_song FROM songs,artist WHERE songs.artist_id = artist.artist_id";
$result = mysql_query($query);
echo "<?xml version="1.0" encoding="UTF-8"?>\n";
echo "<xsongs>\n";
while($row = mysql_fetch_array($result))
{
echo "<xsong>" . $row['surl'] . " " . $row['sartist'] . $row['strackl'] . " " . $row['sart'] . "</xsong>\n";
}
mysql_close($con);
echo "</xsongs>\n";
?>