Uploading to variable folder

See all posts Reply

Uploading to variable folder new!
by SilentMercy, 17 years, 6 months ago
How do I upload files to a unique & dynamically created folder using session variables such as user name or email.Reply
Re: Uploading to variable folder new!
by colin, 17 years, 6 months ago
When you call process(), you set the name of the destination directory. The class will also create the directory for you if it can.

So for instance, you can do:
$name = $_SESSION['name'];
$handle->process('/home/' . $name . '/pics/')
Reply
Re: Uploading to variable folder new!
by SilentMercy, 17 years, 6 months ago
Thank you! I am new to php and just learning. I was just missing the ' ' before and after the variable name.Reply