R: Quick File_Upload Example?

From: Date: Mon, 10 Sep 2001 13:18:29 +0000
Subject: R: Quick File_Upload Example?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66737@lists.php.net to get a copy of this message
1. HTML file: <form method="post" enctype="multipart/form-data" action="PATH OF PHP SCRIPT THAT WILL HANDLE THE FILE"> <input type="hidden" name="MAX_FILE_SIZE" value="MAX SIZE IN BYTES OF THE FILE UPLOADED"> <input type="file" name="myfile"> <input type="submit" value="SEND!!" </form> 2. PHP file (file upload handler): if ($myfile != "none") { print "File uploaded:"; print "Name: ".$file_name; print "Size: ".$file_size; etc....etc...... move_uploaded_file("/PATH/WHERE/YOU/WANT/THE/FILE/".basename($myfile_name); } these snipplets could be useful...i hope you enjoy them. ------------------------ Federico flagzenNO-SPAM@libero.it ------------------------ Smileyq <smileyq0@mindspring.com> wrote in message 3B9C6779.10207@mindspring.com... > After reading about file uploading on the PHP website it doesn't > actually give an example to use for testing purposes. Can somebody > provide me with a very simple and basic file upload example that I can > start from and work with. Thanks for any help ahead of time. > -Smileyq >

« previous php.general (#66737) next »