Re: [PHP] rules for headers?

2001-11-10 Thread Chris Hobbs

Just for kicks, try this instead:

if (!isset($newimage))
{...

jtjohnston wrote:


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


>  
> if(!$newimage)
> {
> header("Content-type: text/html");
> echo "hi";
> echo "rendu: $rendu";
> }else{
> 
> header("Content-type: image/png");
> $image = imagecreate(500, 350);
> //etc...
> }
> ?>
> 
> 


-- 
___  ____    _
Chris Hobbs   / \ \/ / |  | |/ ___\|  __ \
Head Geek| (___  \ \  / /| |  | | (___ | |  | |
WebMaster \___ \  \ \/ / | |  | |\___ \| |  | |
PostMaster) |  \  /  | |__| |) | |__| |
   \/\/\/ \/|_/
   http://www.silvervalley.k12.ca.us
   [EMAIL PROTECTED]


-- 
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]




[PHP] rules for headers?

2001-11-10 Thread jtjohnston

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?

";
echo "rendu: $rendu";
}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]