I am trying to upload a file but the problem i am having is that i get no value if i used $HTTP_POST_FILES['userfile']['name'] .... i have my register globals on and everything but i just can't see what am i doing wrong. here is my code:
-$dir = ".\Apache\htdoc\ ";
-$dir .= $_POST['img1'];
-$temp1 = $_POST['img1'];

-$filename = $HTTP_POST_FILES['img1']['name'];
-echo "filename is $filename<br>\n";

-$temp_file = $HTTP_POST_FILES["img1"]["tmp_name"];
-$file_type = $HTTP_POST_FILES["img1"]["type"];

-if($HTTP_POST_VARS['img1']['name'] != ""){
        copy($temp1,$dir) or
                die ("Couldn't copy the file");

        die("No input file specified");


-<h1>Successful upload </h1>
-You sent: <? print $_POST['img1']; ?>, a <? echo"$img1_size"; ?>
- byte file of type <? echo"$img1_type"; ?>. </p>

please help me because i need this ASAP.. thank you all

Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to