Nope, its doesn't work at all, I fiddled about with it to get it working, but it doesn't display any images.
Going back to the code I was using.
What I'm actually trying to do is eventually have a pull down menu on an admin page, and depending on what is selected from that, display a different image, so I was mucking about with my news file to try and get this to work...
<body bgcolor="black" background="http://www.site.co.uk/images/background.jpg" text="white">
<?php
$db = mysql_connect("mysqlhost", "username", "password");
mysql_select_db("database_name",$db);
$result = mysql_query("SELECT * FROM table_name",$db);
?>
<table align=center width=500 height=100 bgcolor=black>
<tr><td align=center><font size=5 color=green>News</font></td></tr>
<?php
do {
printf ("
<tr><td>%s %s</td></tr>
<tr><td><font size=4>%s</font></td></tr>\n",
$myrow["dati"], $myrow["user"], $myrow["news"]);
if ($user == "James") {echo "<img src=\"http://www.site.co.uk/war/images/testpic.gif\">"; }
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
?>
</body>
But, it doesn't work!
I've tried stripping it down to
<?php
{ echo ($user); }
?>
but it still doesn't work, any ideas?
Thanks