Helping ordinary people create extraordinary websites!
$1 CPM Advertising For A Limited Time Only
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

How To Upload Files Using PHP

By Ben Sinclair
2005-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...


 | Bookmark
Related Tutorials:
» Zend Framework Tutorial
» Port Scanning and Service Status Checking in PHP
» Web Database Access from Desktop Applications
» CubeCart 3.0 Installation and Configuration
» PHP Site Search Made Easy
» Installing and Configuring Drupal 6.1

Ask A Question
characters left.