![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| I search on the internet and i saw a lot of upload-scripts. But in all you only can give 1 directory to put your pictures (or other files) in. On my site i have 3 different driectories. (example: football, swimming and tennis). And i only want to have 1 upload-pae with a <option> where i can choose the directory. Does anyone have a script for this? Greetz Arjan --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 4-8-2003 | |||
| Advertisements |
| | #2 | ||
| On Fri, 15 Aug 2003 14:45:59 GMT in <message-id:Hm6%a.109093$0W5.2955388@pollux.casema.net> "Volhouden" <vraag@maar.nl> wrote: > I search on the internet and i saw a lot of upload-scripts. But in all > you only can give 1 directory to put your pictures (or other files) > in. > > On my site i have 3 different driectories. (example: football, > swimming and tennis). And i only want to have 1 upload-pae with a > <option> where i can choose the directory. > > Does anyone have a script for this? > > Greetz Arjan Just use a switch() statement for something like $_POST['upload_dir'] =) HTH. Regards, Ian [ irrelevant XPs snipped ] -- Ian.H [Design & Development] digiServ Network - Web solutions www.digiserv.net | irc.digiserv.net | forum.digiserv.net Programming, Web design, development & hosting. | |||
| | #3 | ||
| > Just use a switch() statement for something like $_POST['upload_dir'] =) 8-S Sorry... I'm php-noob "Ian.H [dS]" <ian@WINDOZEdigiserv.net> schreef in bericht news:20030815155633.174d46ac.ian@WINDOZEdigiserv.n et... > On Fri, 15 Aug 2003 14:45:59 GMT in > <message-id:Hm6%a.109093$0W5.2955388@pollux.casema.net> > "Volhouden" <vraag@maar.nl> wrote: > > > I search on the internet and i saw a lot of upload-scripts. But in all > > you only can give 1 directory to put your pictures (or other files) > > in. > > > > On my site i have 3 different driectories. (example: football, > > swimming and tennis). And i only want to have 1 upload-pae with a > > <option> where i can choose the directory. > > > > Does anyone have a script for this? > > > > Greetz Arjan > > > > > HTH. > > > > Regards, > > Ian > > > [ irrelevant XPs snipped ] > > -- > Ian.H [Design & Development] > digiServ Network - Web solutions > www.digiserv.net | irc.digiserv.net | forum.digiserv.net > Programming, Web design, development & hosting. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 4-8-2003 | |||
| | #4 | ||
| "Volhouden" <vraag@maar.nl> wrote in message news:<Hm6%a.109093$0W5.2955388@pollux.casema.net>. .. > > I search on the internet and i saw a lot of upload-scripts. But in all you > only can give 1 directory to put your pictures (or other files) in. > > On my site i have 3 different driectories. (example: football, swimming and > tennis). And i only want to have 1 upload-pae with a <option> where i can > choose the directory. > > Does anyone have a script for this? Take the script you are currently using and make two modifications to it: 1. Add a SELECT control insode the HTML form: <SELECT name="destination"> <OPTION value="f">Football <OPTION value="s">Swimming <OPTION value="t">Tennis </SELECT> 2. Find the move_uploaded_file() function. It should look something like this: move_uploaded_file ($file, '/destination/directory'); The first argument is the temporary name of the uploaded file, so you shouldn't modify it. Now edit this line slightly and add a few lines before it: switch ($_POST['destination']) { case 'f': $dest = '/football'; break; case 's': $dest = '/swimming'; break; case 't': $dest = '/tennis'; break; } move_uploaded_file ($file, $dest); That's it, really... Cheers, NC | |||
| | #5 | ||
| In news:Hm6%a.109093$0W5.2955388@pollux.casema.net, verblijdde Volhouden<vraag@maar.nl> ons met de volgende onsterfelijke woorden: > I search on the internet and i saw a lot of upload-scripts. But in > all you only can give 1 directory to put your pictures (or other > files) in. > > On my site i have 3 different driectories. (example: football, > swimming and tennis). And i only want to have 1 upload-pae with a > <option> where i can choose the directory. > > Does anyone have a script for this? > > Greetz Arjan > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.507 / Virus Database: 304 - Release Date: 4-8-2003 n je "Engels"en je naam te zien, begrijp jij Nederlands heel goed. Post dan ook je berichten in een .nl. groep in het Nederlands. O ja, je neemt het mijn virusscanner niet kwalijk, dat je mailtje nogmaals is gescand? -- Wim Hekken ;-) | |||
| | #6 | ||
| > Je virusscanner voegt steeds drue reclameregels aan je mail toe. Das om aan te geven dat er geen virussen inzitten! ;-) En de reden dat ie er een link in zet is omdat t een gratis scanner is. Trouwens wel een aanrader... VGA! hahaha --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 4-8-2003 | |||
| Featured Websites | ||||
|
![]() |
| Tags: different, directories, upload |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ftp upload with php | Chris | PHP | 1 | 07-01-2007 5:05 PM |
| Upload a photo to a web | Nico Schuyt | PHP | 0 | 07-01-2007 4:17 PM |
| php upload script | Stijn De Moor | PHP | 4 | 07-01-2007 3:40 PM |
| Upload | Frank | HTML | 1 | 07-01-2007 2:01 PM |
| Hot directories :) | paidhosting | Directories | 9 | 08-02-2006 1:54 AM |
| Featured Websites | ||||
|