Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
PHP Form + FTP upload
Name: kyleinc Date: January 16, 2005 at 17:18:21 Pacific OS: FreeBSD CPU/Ram: ?
Comment:
I am trying to write a form for a user to upload a file to a directory on my web server. I am connecting correctly and I can run other FTP commands, such as rename, but I am unable to upload. What can be the problem? My code is at http://www.spanimmersion.org/upload.txt
Name: Khalid Date: January 16, 2005 at 23:27:55 Pacific
Reply:
If I look at the code, I have the idea something is missing, ie. the $submit-variable, I dont see where it is created but it is used in the beginning to determine the flow.
Same for $source_file, I do see you have named the form-element 'source-file', but that doesnt mean the file 'gets' into that variabele on his own... $sourcefile = $_FILES['source_file']['tmp_name'] because file-uploads end up in the array $_FILES
Perhaps you should read [url]http://www.php.net/manual/en/features.file-upload.php[/url] first because I also miss the encoding type for the form because you are uploading a file: (form method="POST" action="<?php echo $PHP_SELF?>" enctype="multipart/form-data")
good luck!
0
Response Number 2
Name: cubesoft Date: January 17, 2005 at 07:36:18 Pacific
Summary: Hello all, I actually need a php form by which i can ask users to submit some data and can upload a file.The form data submitted and the file can be sent to my attachment as an e-mail.Does a...
Summary: I'm have a site built and people can login and upload/view their files. It is using Joomla!. I want a progress bar so people know the files are really upload/not timed out. Is it possible to do a pr...
Summary: does anyone know if its possable to get a PHP form to submit to a database on the backend and also send an email with the details to a certain email address with like a verfication link and a username...