contra10 Posted September 9, 2009 Share Posted September 9, 2009 hi I'm trying to put a javascript in my php tags but it doesn't seem to echo anything out <?php $querye = "SELECT * FROM `musiclinks`"; $resulte = mysql_query($querye) or die(mysql_error()); while ($postede = mysql_fetch_assoc($resulte)) { $filename = "{$postede['filename']}"; $date = "{$postede['date']}"; $link = "{$postede['link']}"; $type = "{$postede['type']}"; echo"<p id='audioplayer_1'>$date</p>"; echo"<script type='text/javascript'>"; echo"AudioPlayer.embed('audioplayer_1', {soundFile: 'http://www.website.com/songs/$filename'});"; echo"</script>"; echo"<tr><td width='%50'><a href=''></a></td><td width='%50'></td></tr>"; } ?> I also tried to change it to this thinking it was the quotations: <?php $querye = "SELECT * FROM `musiclinks`"; $resulte = mysql_query($querye) or die(mysql_error()); while ($postede = mysql_fetch_assoc($resulte)) { $filename = "{$postede['filename']}"; $date = "{$postede['date']}"; $link = "{$postede['link']}"; $type = "{$postede['type']}"; echo"<p id='audioplayer_1'>$type</p>"; echo"<script type=\"text/javascript\">\n"; echo"AudioPlayer.embed(\"audioplayer_1\", {soundFile: \"http://www.website.com/songs/$filename\"});\n"; echo"</script>"; echo"<tr><td width='%50'><a href=''></a></td><td width='%50'></td></tr>"; } ?> Quote Link to comment Share on other sites More sharing options...
contra10 Posted September 9, 2009 Author Share Posted September 9, 2009 can i do that? Quote Link to comment Share on other sites More sharing options...
contra10 Posted September 9, 2009 Author Share Posted September 9, 2009 should i be in the javascript section? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.