Read this section of the manual...

http://www.php.net/manual/en/features.file-upload.php

Assuming your form input looks like this:

<input type=file name='userfile'>

then you'll want to use:

$_FILES['userfile']['name']
The original name of the file on the client machine.

$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An
example would be "image/gif".

$_FILES['userfile']['size']
The size, in bytes, of the uploaded file.

$_FILES['userfile']['tmp_name']
The temporary filename of the file in which the uploaded file was stored
on the server.

-p


On Wed, 22 May 2002, Ragnar wrote:

> Hi,
>
>  im a newbie to php and are trying to make a small upload script. So i have
>  read about the variables $userfile and $userfile_name. When i try to run
> the
>  script i get the following error:
>
>  Notice: Undefined variable: userfile
>  Notice: Undefined variable: userfile_name
>
>  Some of the code:
>
>  if ( is_uploaded_file ( $_FILES  [$userfile] [$userfile_name] ) )
>
>  Why cant i use the variables?
>
>
>
>
> --
> 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