I have a PHP file that has to return a image, something like
<img src="http://www.mysyte.com/banner.php?banID=3">
What and how do I have to put after the header to make it work?
$a = mysql_query("Select * from banner where banID='$banID'");
if(mysql_num_rows($a)) {
$row = mysql_fetch_array($a);
header( 'Content-type: image/gif' );
echo "http://www.mysyte.com/banners/$banID.gif";
}
I've read the other posts about a similar problem, but I can't understand it. Please help.