Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Upload Script Problem

Status
Not open for further replies.

Robin131

Technical User
Apr 2, 2001
1
GB
Heya, i got this script and i want to add some more features to it but i don't know how.

The first thing i want to add is a Drop Down Menu which lets people choose where they are uploading the file (eg. if they choose MM it uploads to /uploads/mm/ but if they choose Cars it uploads to /uploads/cars/) I just can't do it.
The second thing i can't do is have another file upload option instead of one.

If anyone knows how i can do any of them please please tell me..
Thanx
 
first you'll need to give each option in the drop down box a value equal to the directory you link to it. Then, on submitting the form, you must make a separate variable where you link this directory string to the uploaded file's name, so you can easily copy it to the folder.

To upload more than one file, you just need to create a new file box (input type='file') with a different name than the first. In the receiving script, you can then use both field names. It works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top