This is the code I am using for uploading:

if(($userfile) && ($userfile != "none"))
{

  $type=basename($userfile_type);

  
  switch ($type) 
  {
   case "jpeg":

   case "pjpeg": $filename="talkroom_gallery_photographs/$username.jpg";
                 copy($userfile, $filename);
                 echo "file copied OK!";
                 echo "<img src=$filename>";
                 break;
   case "gif":   $filename="talkroom_gallery_photographs/$username.gif";
                 copy($userfile, $filename);
                 echo "file copied OK!";
                 echo "<img src=$filename>";
                 break;
   case "bmp":   $filename="talkroom_gallery_photographs/$username.bmp";
                 copy($userfile, $filename);
                 echo "file copied OK!";
                 echo "<img src=$filename>";
                 break;
   default:      echo "invalid picture format";
}

Vlad

-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: 14 березня 2002 р. 10:58
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Opera broswer & file upload

On Thursday 14 March 2002 23:57, Vlad Kulchitski wrote:
> Also another question, my fileupload works everywhere (IE, Netscape) but
> Opera. Does Opera support it at all?
>
> My fileupload is very simple. It checks is the file is JPEG/GIF/BMP and
> then
> saves it, if not, gives an error message.

I use Opera 5.12 for uploads and have no problems.


What problems are you getting?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The more crap you put up with, the more crap you are going to get.
*/

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


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

Reply via email to