JDT |
FREE Downloads |
|
Creating a Simple File Uploader Using PHP - Part 2 |
||||
|
In this series of tutorials we will look at how to develop a simple file uploader using PHP. All of the code is freely available for download (License: GNU GPL) from this link: Download File Uploader. In this tutorial, we will look at how to create a simple form to enable you to browse to, and then upload, a file. Here is a simple form to enable a file to be uploaded:
<form name="form1" method="post" action="fileUpload.php" enctype="multipart/form-data" onSubmit='return checkfields();'> FTP Host Server - the server where you will transfer the file to. Username - the username to access (log onto) the server. Password - the password to access (log onto) the server. Source File - the file to be uploaded. Target Folder - the folder in which the file will be stored. Note also the "enctype" declaration and "file" input type. Together, these produce a form that let's you browse to, and then upload, a file. The &action" will cause the "fileUpload.php" form handler to be run when the "Upload File" button is clicked. <- Go to Part 1 Go to Part 3 -> Go back to PHP Tutorials home page Go back to Tutorials home page
|