nickbwatson Posted June 22, 2011 Share Posted June 22, 2011 So I've been trying to use noswfupload (http://code.google.com/p/noswfupload/) The uploader works fine, the only thing I'm trying to set up is the folder where the file(s) are going to be put into. So the package has a file called "filereceiver.php" which contains a variable "uploadFolder" which you make whatever folder you would like your files to be uploaded to. I thought it would be a good idea for my clients (I will ensure no one has the same name) to be able to upload files to their specific folder so I had it set up with a variable like so : $uploadFolder = "upload/$clientName"; The issue I'm having is I cannot get the $clientName variable to work, unless I declare the variable within the "filereceiver.php" file. So if I put : $clientName = 'Sammy'; mkdir("upload/$clientName", 0777); $uploadFolder = "upload/$clientName"; The files will all be within a folder called Sammy within the upload directory. This works with no issues at all. But when I try to get it to work by pulling the variable from the file the form is in, it doesn't work, it just uploads the file into the upload directory and doesn't create the folder. Basically the action of the form is "filereceiver.php", so I thought that if I created a hidden input that had a value of my client name, like so: $clientName = $_POST['client']; mkdir("upload/$clientName", 0777); $uploadFolder = "upload/$clientName"; But this does the same, it just uploads to the upload directory and doesn't create my folder. Any help on this would be greatly appreciated. Thanks -Nick Quote Link to comment https://forums.phpfreaks.com/topic/240051-noswfupload-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.