What Im trying to do is select a single entry from a table called HEADPIC
where the current date and time are after a datetime value
in a field called POSTED and before a datetime value in a field called
APOSTED. Then I want to take the matching text (which is the name of a
picture)
in the PICNAME field and put it in a link so that, depending on the date, a
different picture will show up (for holidays and such). I have two ways that
I have tried to do this, neither of them works. Can anyone help me with the
coding?
Help MUCH appreciated,
Doug
<BODY>
<?
$query = "SELECT * from headpic WHERE posted >= NOW() AND aposted < NOW()";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
print("<img src=\"imagesb/{$row['picname']}\">");
?>
<br><br>
<img src="imagesb/<? $row['picname'];?>">
</BODY>