General Community > Scripting Help

Javascript in PHP file causing parse error

<< < (4/4)

Oldiesmann:
The value for "song" will be generated by php then passed to javascript through a link, like so:

<?php
...
$q1=mysql_query("SELECT * FROM songs WHERE albumid='$album'");
while($song=mysql_fetch_assoc($q1))
{
  echo '<a href=javascript:SongComment('.$song['songid'].')>sometext</a>';
}
...
?>

Navigation

[0] Message Index

[*] Previous page

Go to full version