How To Upload Files Using PHP
By Ben Sinclair2005-04-11
How To Upload Files Using PHP
OK, so you want to upload an image or file to your server without using your FTP? This is very simple. This tutorial will teach you how!
The Form
First of all you need to create your form to select the file you wish to upload:
form.php
<form action="upload.php" method="post" ENCTYPE="multipart/form-data">
File: <input type="file" name="file" size="30">
<input type="submit" value="Upload!">
</form>
One thing a lot of people forget is this: ENCTYPE="multipart/form-data". If that is not there, it will not work. I've forgotten it before and it took me over half an hour to work out why the script wasn't working...
Tutorial Pages:
» How To Upload Files Using PHP
» The Upload Part
» Going Advanced...
