Computer Webmaster Gaming Console Graphics Forum

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.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

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.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 5:09 PM   #1
Volhouden
 
Volhouden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Upload in different directories

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


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 5:09 PM   #2
Ian.H [dS]
 
Ian.H [dS]'s Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Upload in different directories

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.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:09 PM   #3
Volhouden
 
Volhouden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Upload in different directories

> 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


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:09 PM   #4
Nikolai Chuvakhin
 
Nikolai Chuvakhin's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Upload in different directories

"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
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:10 PM   #5
Wim Hekken ;-\)
 
Wim Hekken ;-\)'s Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Upload in different directories

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 ;-)


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:10 PM   #6
Volhouden
 
Volhouden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Upload in different directories

> 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


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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




All times are GMT +1. The time now is 12:45 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98