I'm getting some strange behavior trying to play music. The script below works fine standalone. However, when I put it into a larger script the music doesn't play but all of the echo statements work and when I view the source the <embed> tags are fine, etc. What could the issue be? If you need me to send the larger file let me know.
<?php /* MUSIC? */ require($_SERVER['DOCUMENT_ROOT']."/tgwedding/configuration.inc"); require(SITEROOT."/mysql_connect.php"); $ID = 1; $query_music = "SELECT playMusic, songSelection, musicFile FROM preferences WHERE customerID='$ID'"; $result_music = @mysql_query($query_music); $row_music = mysql_fetch_array($result_music, MYSQL_NUM);//store this record as an array "row" echo $row_music[0]; if ($row_music[0] == 1) { // play music if ($row_music[1] == "s") { echo $row_music[1]; echo $row_music[2]; echo '<embed src="songs/'.$row_music[2].'" hidden=true autostart=true loop=true> <noembed> <bgsound src="songs/'.$row_music[2].'" loop=infinite> </noembed>'; } else { echo '<embed src="'.MUSICDIRECTORY.$row_music[2].'" hidden=true autostart=true loop=true> <noembed> <bgsound src="'.MUSICDIRECTORY.$row_music[2].'" loop=infinite> </noembed>'; } } /* MUSIC? */ mysql_close(); ?>