rf: http://www.php.net/manual/en/features.file-upload.php
$userfile - The temporary filename in which the uploaded file was stored on
the server machine. 
$userfile_name - The original name or path of the file on the sender's
system. 
$userfile_size - The size of the uploaded file in bytes. 
$userfile_type - The mime type of the file if the browser provided this
information. An example would be "image/gif". 

so you'd use $image_name instead of $image

-----Original Message-----
From: Ryan Stephens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 4:17 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Newbie Image uplaod question


Sorry... i changed

<Input Type="File" Name="$image">

to

<Input Type="File" Name="image">

but still no luck..... it returns "Array" as the file name and doesnt upload
the file.

Whats up??

Ryan


"Ryan Stephens" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ok... ive tried this  but no go:
>
> <--------------------------------------------->
> function UploadImage(){
>     global $HTTP_POST_FILES;
>     global $image;
>     reset($HTTP_POST_FILES);
>     $pic_file = $HTTP_POST_FILES['image'];
>     copy ($pic_file['tmp_name'], "../images");
> }
>
> <FORM ACTION="<?php $SCRIPT_NAME ?>" Method="Post"
> ENCTYPE="multipart/form-data" >
>
> <Input Type="File" Name="$image">
> <Input Type="Submit" Name="Submit">
>
> </FORM>
> <--------------------------------------------->
>
> all i get returned is an empty filename ("") and an error..... please
help!
>
> Ryan
>
>
>
>
> "Hank Marquardt" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > http://www.php.net/manual/en/features.file-upload.php
> >
> > On Tue, Nov 27, 2001 at 08:14:48PM -0800, Ryan Stephens wrote:
> > > Hey guys...
> > >
> > >     Im new to PHP and am trying to upload images to the server and
store
> the
> > > file name into mySQL database...... but i dont have a clue how to do
> this...
> > > all i know is i need to use <Input Type="File"> other than that im
lost.
> > >
> > >     Any help would be great.
> > >
> > >     Thanks
> > > Ryan Stephens
> > >
> > >
> > >
> > > --
> > > 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]
> > >
> >
> > --
> > Hank Marquardt <[EMAIL PROTECTED]>
> > http://web.yerpso.net
> > GPG Id: 2BB5E60C
> > Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
> > *** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
> > *** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild
> > *** Beginning PHP -- Starts January 7, 2002
> > *** See http://www.hwg.org/services/classes
>
>



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