PDA

View Full Version : probleming outputing html inside while loop


tiger007
02-11-2006, 05:48 PM
wrote the script but do not know how to place the html code for the form control(checkbox) i get errors!! could u tell me how to place the html inside the while loop?thanks

<?
.....
......
$query = "SELECT id,filename, artist, album,title FROM wimpy";
$result = mysql_query($query);

while($row = mysql_fetch_assoc($result))
{
echo "Id : {$row['id']} <br>" .
"filename :{$row['filename']} <br>" .
"artist : {$row['artist']} <br>" .
"album : {$row['album']} <br>" .
"title : {$row['title']} <br><br>";

//error below here==> error
echo "
<input
type="checkbox" name="Id" value="{$row['id']}"></td>
<td bgcolor="#C0C0C0"><a
href="javascript:newWindow('./player/ram4.php?sid={$row['id']}')"><img
src="images/Speaker.gif"
alt="Listen to this Song" border="0"
width="16" height="16"
longdesc="Listen to this Song"></a>&nbsp;{$row['title']} </td>
<td bgcolor="#C0C0C0">{$row['title']}</td>
<td bgcolor="#C0C0C0"><a
href="javascript:newWindow('RateSong.asp?SongID={$row['id']}')"><img
src="images/RatIt.gif"
alt="Rate This Song" border="0"
width="100" height="22"
longdesc="Rate This Song"></a></td>
<td align="center" bgcolor="#C0C0C0">0&nbsp;</td>
<td bgcolor="#C0C0C0">coming Soon <!-- <a href="../site.php?songID=1&Song=Atash">Read </a>| <a href="../Members/WriteLyrics.php?SongId=1&Song=Atash">Write</a> --> </td> ";

}


?>