thenewperson Posted November 6, 2009 Share Posted November 6, 2009 Need help on upload script. My upload script works fine but i was adding more to it to create directory if it does not exist. This goes well till i try to use the $_POST['user'] command. When i use it it does not grab the username and create directory. The login forum value is 'user'. <?php $user = $_POST["user"]; $file = "uploads/"; mkdir($file.$user,0775); ?> if i were to set $user = "jim" the file will create. i have also tryed $_GET['user'] and same thing happens. Wondering if its cuase login system or upload system im using. upload system: http://webdeveloperplus.com/jquery/multiple-file-upload-with-progress-bar-using-jquery/ login system: http://evolt.org/node/60384 if anyone can solve this ill look at you as god ^^ Link to comment https://forums.phpfreaks.com/topic/180500-solved-cant-figure-this-out-for-my-life-need-help/ Share on other sites More sharing options...
rajivgonsalves Posted November 6, 2009 Share Posted November 6, 2009 looking at the login system why don't you try <?php $user = $session->username; $file = "uploads/"; mkdir($file.$user,0775); ?> Not to sure it will work but its worth a try (Have not gone through the full code of the login system Link to comment https://forums.phpfreaks.com/topic/180500-solved-cant-figure-this-out-for-my-life-need-help/#findComment-952235 Share on other sites More sharing options...
thenewperson Posted November 6, 2009 Author Share Posted November 6, 2009 looking at the login system why don't you try <?php $user = $session->username; $file = "uploads/"; mkdir($file.$user,0775); ?> Not to sure it will work but its worth a try (Have not gone through the full code of the login system TY my new god. Finally got it <?php include("loginsystem/include/session.php"); $user = $session->username; $file = "uploads/"; mkdir($file.$user,0770); ?> Link to comment https://forums.phpfreaks.com/topic/180500-solved-cant-figure-this-out-for-my-life-need-help/#findComment-952240 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.