thenewperson Posted November 4, 2009 Share Posted November 4, 2009 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 More sharing options...
Gayner Posted November 4, 2009 Share Posted November 4, 2009 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? Link to comment https://forums.phpfreaks.com/topic/180241-php-upload-help-needed/#findComment-950808 Share on other sites More sharing options...
thenewperson Posted November 4, 2009 Author Share Posted November 4, 2009 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 Link to comment https://forums.phpfreaks.com/topic/180241-php-upload-help-needed/#findComment-950809 Share on other sites More sharing options...
Gayner Posted November 4, 2009 Share Posted November 4, 2009 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 Link to comment https://forums.phpfreaks.com/topic/180241-php-upload-help-needed/#findComment-950811 Share on other sites More sharing options...
thenewperson Posted November 4, 2009 Author Share Posted November 4, 2009 that code there , will it create the folder if doesnt exist ? ifso thats exactly what i was looking for Link to comment https://forums.phpfreaks.com/topic/180241-php-upload-help-needed/#findComment-950812 Share on other sites More sharing options...
Gayner Posted November 4, 2009 Share Posted November 4, 2009 that code there , will it create the folder if doesnt exist ? ifso thats exactly what i was looking for that's the function for php to move it after u got all code that uploads it Link to comment https://forums.phpfreaks.com/topic/180241-php-upload-help-needed/#findComment-950824 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.