Fsoft Posted July 2, 2008 Share Posted July 2, 2008 Hi I want to make a simple script, Which will have an HTML Browse button, and a submit button, And once submited we will have to set a directory on server for example /upload And once we submit, that file will be uploaded to /upload directory. AND YA I will make upload directory 777 <CHMOD> So php script will able to write it Please help Thanks a lot FAISAL! Quote Link to comment Share on other sites More sharing options...
lemmin Posted July 2, 2008 Share Posted July 2, 2008 From http://msdn.microsoft.com/en-us/library/ms535263(VS.85).aspx : <FORM NAME="oForm" ACTION="repost.php" ENCTYPE="multipart/form-data" METHOD="post"> <INPUT TYPE="file" NAME="oFile1"/> <INPUT TYPE="submit" VALUE="Upload File"> </FORM> For php: move_uploaded_file($_FILES['oFile1']['tmp_name'], "upload/".$_FILES['oFile1']['name']); Here is documentation for that: http://www.php.net/manual/en/function.move-uploaded-file.php Good luck! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.