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/173705-mix-php-with-java/ Share on other sites More sharing options...
contra10 Posted September 9, 2009 Author Share Posted September 9, 2009 should i be in the php forum or java? Link to comment https://forums.phpfreaks.com/topic/173705-mix-php-with-java/#findComment-915656 Share on other sites More sharing options...
trq Posted September 9, 2009 Share Posted September 9, 2009 Your using Javascript not Java. There is a massive difference. I don't see any issues with the code provided, what does the html output look like? Link to comment https://forums.phpfreaks.com/topic/173705-mix-php-with-java/#findComment-915699 Share on other sites More sharing options...
contra10 Posted September 10, 2009 Author Share Posted September 10, 2009 sorry about that, I don't get any output though Link to comment https://forums.phpfreaks.com/topic/173705-mix-php-with-java/#findComment-915808 Share on other sites More sharing options...
chmpdog Posted September 10, 2009 Share Posted September 10, 2009 That should echo check to make sure it is in the source Link to comment https://forums.phpfreaks.com/topic/173705-mix-php-with-java/#findComment-915815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.