Renaming uploaded files - Need help with forms (Posted by Malu)
I'm creating an upload script for a few users. I use file-upload.cgi if it helps. This is basically what the script that collects the data looks like:
<FORM ENCTYPE="multipart/form-data" ACTION="file-upload.cgi" METHOD="POST">
<INPUT TYPE="FILE" NAME="file-to-upload-01" SIZE="35">
<INPUT TYPE="HIDDEN" NAME="FNumber" VALUE="$in{'FNumber'}">
<INPUT TYPE="SUBMIT" VALUE="Upload File(s)!">
In the file-upload script, i've added a renaming line which looks like this:
rename($savedirectory\/$filename),($savedirectory\/$FNumber");
The problem is that it won't rename properly. The $FNumber must be "defined" in the file-upload.cgi somehow, and being new at CGI I don't have a clue. Please help!