This is my upload script... the post and get variables are passing fine but then when i try to upload using this script.. it goes to google... with a search string of localhost..
Max Upload is set to 80MB in php.ini and i am trying to upload just 1 MB file.. also uploads have bee set on..
please suggest
Regards
$action = $HTTP_POST_VARS["action"];
$max_size = "50000000"; // Max size in BYTES (1M😎
$updir = "/var/www/html";
echo "
$updir<br>$action<br>
<b>Uploader</b><br>
<form action='upl.php' method=post enctype='multipart/form-data'>
File (max size: $max_size bytes/".($max_size/1024)." kb):<br>
<!-- This is NOT a secure method of checking filesize, but it tells the user if he tried to upload a file too big before
he waits for the huge file to upload, make sure to check the filesize after the form is sent as well -->
<!-- <input type='hidden' name='MAX_FILE_SIZE' value='$max_size'> (removed because it wasn't working properly) -->
<input type='file' name='filename'><br>
<input type='hidden' name='action' value='upload'>
<input type='submit' value='Upload File'>
</form>";
if ($action == 'upload')
{
print "teri jai ho";
exit;
if ($_FILES["filename"]["size"] > $max_size) die ("<b>File too big! Try again...</b>");
copy($FILES["filename"]["tmp_name"],$updir.$FILES["filename"]["name"]) or die("<b>Unknown error!</b>");
//copy($FILES["filename"]["tmp_name"],"./".$FILES["filename"]["name"]) or die("<b>Unknown error!</b>");
echo "<b>File Uploaded.</b>"; // for debug --> $filename --> ".$destination."/".$filename_name."</h2>";
}