Jacobb123
10-29-2007, 03:51 AM
I am trying to put add slashes to a script and it is not doing and it returns nothing so could someone please look and tell me what the issue is?
$location= addslashes($row['song_file']);
$image= addslashes($row['image_file']);
//XML Header
$XML = '<?xml version="1.0" encoding="UTF-8"?>';
$XML .= "
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>";
//loop through all Tracks in database
while($row = mysql_fetch_assoc($result)){
$XML .= "<track>\n";
$XML .= "<title>" . $row['song_name'] . "</title>\n";
$XML .= "<location>http://store.labelfreeartists.com/" . $location. "</location>\n";
$XML .= "<image>http://store.labelfreeartists.com/" . $image. "</image>\n";
$XML .= "<info>" . "http://store.labelfreeartists.com/product_info.php?products_id=".$row['cart']. "</info>\n";
$XML .= "<lyrics>" . "view_lyrics.php?song_id=" . $row['id'] . "</lyrics>\n";
$XML .= "<add>" . "add_song.php?id=" . $row['id'] . "&member_id=".$row['original_id']. "</add>\n";
$XML .= "<rate>" . "rate_songs.php?id=" . $row['id'] . "</rate>\n";
$XML .= "</track>\n";
}
//XML Footer
$XML .= "</trackList>
</playlist>";
I am trying to add slashes to the $location and $image and after the XML file is written it there is nothing where the variables should be. anyone got a clue?
$location= addslashes($row['song_file']);
$image= addslashes($row['image_file']);
//XML Header
$XML = '<?xml version="1.0" encoding="UTF-8"?>';
$XML .= "
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>";
//loop through all Tracks in database
while($row = mysql_fetch_assoc($result)){
$XML .= "<track>\n";
$XML .= "<title>" . $row['song_name'] . "</title>\n";
$XML .= "<location>http://store.labelfreeartists.com/" . $location. "</location>\n";
$XML .= "<image>http://store.labelfreeartists.com/" . $image. "</image>\n";
$XML .= "<info>" . "http://store.labelfreeartists.com/product_info.php?products_id=".$row['cart']. "</info>\n";
$XML .= "<lyrics>" . "view_lyrics.php?song_id=" . $row['id'] . "</lyrics>\n";
$XML .= "<add>" . "add_song.php?id=" . $row['id'] . "&member_id=".$row['original_id']. "</add>\n";
$XML .= "<rate>" . "rate_songs.php?id=" . $row['id'] . "</rate>\n";
$XML .= "</track>\n";
}
//XML Footer
$XML .= "</trackList>
</playlist>";
I am trying to add slashes to the $location and $image and after the XML file is written it there is nothing where the variables should be. anyone got a clue?