Hi guys,
I'm a complete newbie here on PHP Builder. I've been dabbling with php for a while and trying to fathom the language out...however, I'm running a script and keep getting the following error:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/blackwid/public_html/development/dbupload/view.php on line 13
the line in question is:
echo "<td><img src="post.php?imgid=".$rs[0]."" width=100 height=100></td></tr>n";
my code is:
<?
include "comm.inc";
connectdb();
$sql = "SELECT imgid,imgtype FROM tblimage ORDER BY imgid";
$result = @mysql_query($sql) or die(mysql_error());
echo "<table border=1>n";
echo "<tr><th>imgid</th><th>imgtype</th><th>imgdata</th></tr>n";
while ($rs=mysql_fetch_array($result)) {
echo "<tr><td>".$rs[0]."</td>";
echo "<td>".$rs[1]."</td>";
echo "<td><img src="post.php?imgid=".$rs[0]."" width=100 height=100></td></tr>n";
};
querytable.php?database=blackwid_content&table=tblimage
echo "</table>n";
?>
I've tried various combinations of double and single quotes, backslashes, etc of the course of the past couple of days...but still nothing!
Was wondering if anyone could help?
Its probably something really simple and staring straight at me!
Many thanks in advance
Mark