Hi guys,
I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you click on a song title, this title is passed as a variable to a PHP page then to a Flash page. The Flash page contains an actionscript music player which then looks for the right audio file in the database and plays the song. Everything works great except for the dynamic text field which displays the song title. If the song title contains an apostrophe or a single quote, the Flash dynamic text field then shows the apostrophe preceded by a \.
Here's an image :
For example, the song Breaking up somebody's home (by Nanette Workman) is written as is into the MySQL database. The display into the HTML page is fine ( no \), The problem is with the Flash dynamic text field.
The problem I think, is that PHP variables are sent to the Flash player and one of these variables contains a string with single quotes in it (the actual song title). Here's the partial code that points the problem :
Where $aTitle is the song title containing a single quote. How can I tell Flash to NOT escape the single quote ?
The actual site is here :
Many thanks in advance.
Joshley
I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you click on a song title, this title is passed as a variable to a PHP page then to a Flash page. The Flash page contains an actionscript music player which then looks for the right audio file in the database and plays the song. Everything works great except for the dynamic text field which displays the song title. If the song title contains an apostrophe or a single quote, the Flash dynamic text field then shows the apostrophe preceded by a \.
Here's an image :
For example, the song Breaking up somebody's home (by Nanette Workman) is written as is into the MySQL database. The display into the HTML page is fine ( no \), The problem is with the Flash dynamic text field.
The problem I think, is that PHP variables are sent to the Flash player and one of these variables contains a string with single quotes in it (the actual song title). Here's the partial code that points the problem :
Code:
<?php
while($arrAudio = mysql_fetch_assoc($resultAudio))
{
$aTitle = $arrAudio["Title"];
$aFile = $arrAudio["File"];
$counter = $counter + 1;
?>
Track <?=$counter?> / <em>Plage <?=$counter?></em> : <a href="<?=$_SERVER['PHP_SELF'].'?audioname='.$aTitle.'&audiofile='.$aFile.'&imagefile='.$flashImage?>" target="_blank"><?= $aTitle ?></a><br />
<?php
Where $aTitle is the song title containing a single quote. How can I tell Flash to NOT escape the single quote ?
The actual site is here :
Many thanks in advance.
Joshley