This way works fine!! Thank you very much.
-----Original Message----- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:10 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Image output (Newb question) you should have script, call it image.php or something like that, the only thing that should be in that script is this: <?php $link = mysql_connect("localhost", "root", ""); if ($link){ header("Content-type: image/png"); $im = imagecreatefrompng("images/map/map-15x9.png"); imagepng($im); //,"images/".session_id().".png" imagedestroy($im); mysql_close($link); } else{ //probably want to have another way to handle this error echo("Not connected."); } ?> no html tags in there, no whitespace. to see the image you could call the page like this http://www.yourdomain.whatever/image.php . you could call it in a iumage tag like this <img src="http://www.yourdomain.whatever/image.php" /> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php