Hi,
I am creating a website for my friends music company. What I’ve done so far is made a PHP script that gets the url of the song name from the MySQL database and then puts it into a PHP variable. What I’m needing help on is embedding PHP into JavaScript. I am new to JS so bare with me. I will use a basic PHP variable for the example below. Thanks in advance:
[CODE]
<?php
$songname = “1.mp3″;
?>
<script type=”text/javascript”></script>
<script type=”text/javascript”>
var so = new SWFObject(“playerSingle.swf”, “mymovie”, “192”, “67”, “7”, “#FFFFFF”);
so.addVariable(“autoPlay”, “yes”);
so.addVariable(“soundPath”, “<?php $songname ?>”); [B]#1[/B]
so.write(“flashPlayer”);
</script>
#1 is what I need help on.