PHP File Uploading easy to learn tutorial with complete script

PHP is world's no. 1 server side scripting language, it comes with plenty of features and one of the most famous one is file uploading which is extensively used world wide.
Self Explanatory PHP File Uploading Example

Self Explanatory PHP File UploadingExample

First Create a directory called  gallary/ .
Save this file as gallery.php

<!DOCTYPE html>
<html lang="en">
<title>File Uploading</title>
<meta charset="utf-8" />
echo "The file ".basename($_FILES['file_upload']['name'])." has been uploaded";
echo "There is an error,please retry or ckeck path";
<form action="gallery.php" method="post" enctype="multipart/form-data">
<table width="384" border="1" align="center">
<td width="108">Select File</td>
<td width="260"><label>
<input type="file" name="file_upload">
<input type="submit" name="upload" value="Upload File">

Labels: ,