hi guyz im trying to save user uploaded files each with a unique name now ....
1. for some strange reason this piece of code aint working :S if (is_uploaded_file($HTTP_POST_FILES['$userfile']['$name'])) { copy($HTTP_POST_FILES['$userfile']['$name'],"c:/tmp uploadz/"); } else { echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES['$userfile']['$name']; } neither does this : move_uploaded_file($HTTP_POST_FILES['$userfile']['$name'], "c:/tmp uploadz/"); i get a msg: file submitted .NeedsUPDATED.doc. file sixe .23552. file type .application/msword. Possible file upload attack. Filename: and nothing gets saved on disk 2. while this works fine $name = $firstName.$lastName.$title.$cat.$lang.$unique_id; if (copy($userfile, "c:/tmp uploadz/" . $unique_id."-".$name)) echo("<b> file successfully uploaded </b>"); else //(!$userfile_size) echo( "Either you did not upload any file, or you uploaded an empty file! "); whats with the first code ???? 3. i want the file to be save as $name but it doesnt do dat it either saves the file as its original name or it saves it as a horrid timestamp OR worse even ....as 1026114031-$firstName while its supposed to take the $firstName from the previous form :( 4. the most horribale thing 1026114031-NeedsUPDATED.doc this is the horrid time stamp i get fo my file name whats wrong with it .... i cant make anything outta it where m i messing up now .... id really appriciate any help with this thnx a million stuck as usual .... :s toby ...... __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php