Skip to content

Instantly share code, notes, and snippets.

@stormsweeper
Created September 22, 2014 14:55
Show Gist options
  • Save stormsweeper/ed7179da0d16a1e1a8d1 to your computer and use it in GitHub Desktop.
Save stormsweeper/ed7179da0d16a1e1a8d1 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>form upload test</title>
<meta name="viewport" content="user-scalable=no, width=device-width" />
<meta name="apple-mobile-web-app-capable" content="yes" />
</head>
<body>
<?php
if (!empty($_POST)) {
if (!empty($_FILES)) {
echo '<pre>'.print_r($_FILES, true).'</pre>';
} else {
echo '<pre>no files uploaded</pre>';
}
}
?>
<form enctype="multipart/form-data" method="post" action="upload.php">
<input type="hidden" name="is_post" value="1"/>
<input type="file" name="uploaded_file"/>
<input type="submit"/>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment