I would like to allow clients to upload digital photos [files] of their home so that I can place them on my website. On many sites there is a "file upload" function with a browse feature that allows you to look for files on your local computer. What is involved in setting this up?
If you have PHP it's easy. Just let us know if you need help. http://us2.php.net/manual/en/features.file-upload.php
Ok this is what i do in my php file.... $name = $_FILES['uploadfilename']['name']; if (is_uploaded_file($_FILES['uploadfilename']['tmp_name'])) { copy ($_FILES['uploadfilename']['tmp_name'], "www/upload/files/".$_FILES['uploadfilename']['name']); Note: In my form my file field has a name of uploadfilename Does that help any?
Please look at the sequence below and tell me what steps are missing. 1.) I created a form: <form enctype="multipart/form-data" action="http://www.resalebroker.com/uploadfilename.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> 2.) I created a PHP file named "uploadfilename.php" Contents: $name = $_FILES['uploadfilename']['name']; if (is_uploaded_file($_FILES['uploadfilename']['tmp_name'])) { copy ($_FILES['uploadfilename']['tmp_name'], "www/upload/files/".$_FILES['uploadfilename']['name']); I appreciate the help.
First off, your if statement needs to be closed with a } Second, in the php file you need to change uploadfilename to userfile as your field name is different than mine was. Are you getting errors? Do you have a site up we could see? I always helps