Jump to content

[SOLVED] Cant figure this out for my life, need help


thenewperson

Recommended Posts

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 ^^

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  :P

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  :P

 

TY my new god. Finally got it

 

<?php
include("loginsystem/include/session.php");

$user = $session->username;
$file = "uploads/";

mkdir($file.$user,0770);

?>

 

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.