/***************************by garcon1986**************************/ form.html <html> <head> <title>Upload File</title> </head> <body> <form enctype="multipart/form-data" method="POST" action="uploader.php"> <label></label> <input type="file" name="uploadfile" /> <input type="submit" name="submit" value="submit" /> </form> </body> </html> uploader.php <?php if($_FILES["uploadfile"]["size"] < 100000000){ if($_FILES["uploadfile"]["error"]>0){ echo "error"; } else{ echo "success"; if(file_exists("c:/wamp/www/upload/".$_FILES["uploadfile"]["name"])){ echo "File".$_FILES["uploadfile"]["name"]."already exists"; } else{ move_uploaded_file($_FILES["uploadfile"]["tmp_name"],"c:/wamp/www/upload/".$_FILES["uploadfile"]["name"]); echo "Move to c:/wamp/www/upload/".$_FILES["uploadfile"]["name"]; } } } else{ echo "Invalide file"; } ?>