I'm creating an image, but I want to do as below so when I do

http://www..../image.php it displays html and ...
http://www..../image.php?newimage=1  displays my image

However it crashes if $newimage=1
My image doesn't display.

My image works otherwise if I simply erase the if loop.

Is this a problem declaring headers?
How can I overcome this so I can contain everything in one file, rather
than farming the image out to a separate file.php?

<?php

if(!$newimage)
{
header("Content-type: text/html");
echo "hi<br>";
echo "rendu: $rendu<br>";
}else{

header("Content-type: image/png");
$image = imagecreate(500, 350);
//etc...
}
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to