Forum Moderators: coopster
In the following funktion I am trying to add the uid in front of every file name.
With $uid.$file_orig it just keeps the file name no uid;
With "$uid-$file_orig" it only adds the '-' to the file name
function do_upload($upload_dir, $upload_url) {
$temp_name = $_FILES['userfile']['tmp_name'];
$file_orig = $_FILES['userfile']['name'];
$file_name = $uid.$file_orig;
$file_type = $_FILES['userfile']['type'];
$file_size = $_FILES['userfile']['size'];
$result = $_FILES['userfile']['error'];
$file_url = $upload_url.$file_name;
$file_path = $upload_dir.$file_name;
[edited by: ergophobe at 11:04 pm (utc) on Feb. 19, 2005]
[edit reason] URL deleted as per Terms of Service [/edit]
For a long explanation of variable scope in functions, see message 7 of
[webmasterworld.com...]