phprockers-logo

Uploading Files with PHP

This script will allow you to upload files from your browser to your hosting, using PHP. The first thing we need to do is create an HTML form that allows people to choose the file they want to upload. 

<form enctype="multipart/form-data" action="upload.php" method="POST"> 
<lable> Please choose a file: </lable>
<input name="uploaded" type="file" /><br /> 
<input type="submit" value="Upload" /> 
</form> 
 
This form sends data to the file "upload.php". Then we can easily get the uploaded information using file function in upload.php.

1 comment: