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 its original 
name :(

4. the most horribale thing
1026114031-getStart.zip
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 ....

n YES its related to THIS list ... since i ve to store the uploaded file in 
mysql database


id really appriciate any help with this

stuck as usual ....

toby ......


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to