Jump to content

PHP UPLOAD HELP NEEDED


thenewperson

Recommended Posts

Hey i have upload script that works fine but i want to add another option to it. Currently it uploads all files uploaded to folder called uploads but i want to have folders create themselves for a user. Example like if user "FRANKY" uploads something i want it to upload to folder FRANKY or if user "JIMMYJONES383" uploads something i want it to upload to folder JIMMYJONES383. If this folder does not exist create it. If this is not good way to name files please add advice. But main thing im looking for is to create a folder for each users uploads but havnt clue how to do this.

 

script is long , so if you know how post it with substitute variables and how it works if you could.

Link to comment
https://forums.phpfreaks.com/topic/180241-php-upload-help-needed/
Share on other sites

are u going to be insterting it in any database too ? if so just use mysql query then insert bla..

 

 

 

Or are u talkin about making a specific folder for each person ? and uploading that contend in that relevant folder?

 

i want to upload the files to folder , not the database. Each person will get their own folder for privite uploading. Anyfiiles of that user will be uploaded to their privite folder

are u going to be insterting it in any database too ? if so just use mysql query then insert bla..

 

 

 

Or are u talkin about making a specific folder for each person ? and uploading that contend in that relevant folder?

 

i want to upload the files to folder , not the database. Each person will get their own folder for privite uploading. Anyfiiles of that user will be uploaded to their privite folder

 

oh

 

well do u have a system installed already?

 

bcz then u can just pull there username with $_GET['username'] function or w/e and echo it out for the directory name like this:

 

 

 

move_uploaded_file($_FILES["file"]["tmp_name"],

      "'.$_GET['username'].'/private/"  . str_replace (" ", "",$_FILES["file"]["name"] . $abcd));

 

 

forget the $abcd variable but that shows how to make 1 for each user

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.