<?php ?><?php echo $_SERVER['SCRIPT_FILENAME']; echo "<br />"; if ( is_uploaded_file ($_FILES['filename']['tmp_name']) ) { echo "UPLOAD OK KANKA<br />"; } else { echo "AMK AMK AMK "; } if ($_POST['submit']=='Upload') { if ( move_uploaded_file( $_FILES['filename']['tmp_name'], "{$_FILES['filename']['name']}" ) ) { print '<p> The file has been successfully uploaded </p>'; } else { echo "<br />a". $_FILES['filename']['error']; switch ($_FILES['filename']['error']) { case 1: print '<p> The file is bigger than this PHP installation allows</p>'; break; case 2: print '<p> The file is bigger than this form allows</p>'; break; case 3: print '<p> Only part of the file was uploaded</p>'; break; case 4: print '<p> No file was uploaded</p>'; break; } } echo "UPLOADED ANAM";// header("location:http://localhost/login.php"); exit; }?><html><head></head><body><form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="20000"> Your file: <input name="filename" type="file"> <input name="submit" type="submit" value="Upload"></form></body></html>