-----Original Message-----
From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
Sent: 10 October 2003 17:06
To: [EMAIL PROTECTED]
Subject: [PHP] Display a JPG Image


Hello Everyone,

   I am trying to display a JPG image to a use, who has logged in. Some 
research on google revealed a way to do this. I am using the following 
code to display it.

if (session_is_registered("valid_user")){

            if(session_is_registered("cmi")){
                
                        header("Content-type: image/jpg");
                        $file = "docs/picture1.jpg";
                        header("Content-disposition: attachment; filename=$file" );
                        readfile($file);

             } 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to