Can't get song to play when pulling from database
Posted: Sat Jul 05, 2008 7:34 pm
I have an interesting issue. When I manually type a url-encoded song title and echo it, it will play in my flash song player using AS2, but when I pull the song title from the database and echo it in the same format it won't play. The name of the song is "As" by Stevie Wonder. When I manually type it in like this: echo "&title=As&"; It echos to the screen in just that format, and I can pick it up as a variable in Actionscript 2 and play it. But when I do it like this:
$string2 = $_POST['Song'];
$rs2 = mysql_query("SELECT * FROM mymusic where song = '$string2'");
$row2 = mysql_fetch_array($rs2);
$sng = $row2['Song'];
echo "&title=$sng&"
it echos to the screen fine, and in the exact format as the manual echo, but it won't play. does anyone have any ideas as to why?
$string2 = $_POST['Song'];
$rs2 = mysql_query("SELECT * FROM mymusic where song = '$string2'");
$row2 = mysql_fetch_array($rs2);
$sng = $row2['Song'];
echo "&title=$sng&"
it echos to the screen fine, and in the exact format as the manual echo, but it won't play. does anyone have any ideas as to why?