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>"; } ?> Link to comment https://forums.phpfreaks.com/topic/173696-solved-mix-php-with-java/ Share on other sites More sharing options...
contra10 Posted September 9, 2009 Author Share Posted September 9, 2009 can i do that? Link to comment https://forums.phpfreaks.com/topic/173696-solved-mix-php-with-java/#findComment-915618 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? Link to comment https://forums.phpfreaks.com/topic/173696-solved-mix-php-with-java/#findComment-915625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.