Jump to content

[SOLVED] mix php with java


contra10

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.