PHP

VERY SIMPLE PHP FILE UPLOAD

<form action="up.php" method="post"    enctype="multipart/form-data">   <input type="file" name="up" required/>   <input type="submit" value="Go"/> </form>

SIMPLE FILE UPLOAD (A)

01

$src = $_FILES["up"]["tmp_name"]; $dest = $_FILES["up"]["name"];   move_uploaded_file($src, $dest);

SIMPLE FILE UPLOAD (B)

02

<form action="up.php" method="post"    enctype="multipart/form-data">   <input type="file" name="up[]"                multiple="multiple" required>   <input type="submit" value="Go"/> </form>

MULTIPLE FILES UPLOAD (A)

03

$all = count($_FILES["up"]["name"]); for ($i=0; $i<$all; $i++) {   $src = $_FILES["up"]["tmp_name"][$i];   $dest = $_FILES["up"]["name"][$i];   move_uploaded_file($src, $dest); }

MULTIPLE FILES UPLOAD (B)

04