class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
You should use a hidden field for upload_dir. But really, it is a very unsecure way to do. You'd better have a list of possible directories in your form, in a select list for instance, and then in your PHP code translate the user's choice into a real directory.
In any case, this is a PHP issue, and doesn't really belong here.Reply
Because I am using this locally on my own PC security is no issue for me. The problem is that usingthis syntax:
$handle->Process('./jGallery/albums/$dir');
will create a new directory called $dir in stead of a new directory withteh value of $dir (for exampel 4 if I want to upload an image for bird number 4.Reply
I am retrieving this value in upload.php like this:
Then I want the image to be uploaded to the correct directory using the value of $dir. Something like this:
But this doesn't work.
Can anyone help me out on this ?
Kins regards,
Rene
In any case, this is a PHP issue, and doesn't really belong here.
will create a new directory called $dir in stead of a new directory withteh value of $dir (for exampel 4 if I want to upload an image for bird number 4.
or:
This works perfect. I am not a very experienced php programmer. Thanks again for your help.
Rene