RE: [PHP] Newbie Image uplaod question

From: Date: Wed, 28 Nov 2001 05:20:12 +0000
Subject: RE: [PHP] Newbie Image uplaod question
Groups: php.general 
Request: Send a blank email to php-general+get-75844@lists.php.net to get a copy of this message
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:Ryan_Stephens@hotmail.com] Sent: Wednesday, November 28, 2001 4:17 PM To: php-general@lists.php.net 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" <Ryan_Stephens@hotmail.com> wrote in message news:20011128051252.23954.qmail@pb1.pair.com... > 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" <hmarq@yerpso.net> wrote in message > news:20011127211308.B8671@menard.yerpso.net... > > 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: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > > Hank Marquardt <hank@yerpso.net> > > 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#75844) next »