Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
What's wrong with reading the type?
<html>
<head>
<title>FORM</title>
</head>
<body>
<h2>Registration Form</h2>
<form ENCTYPE="multipart/form-data" method="post" action="insert.php">
Name: <input type="text" name="name" maxlength="15" /><br />
Email: <input type="text" name="email" maxlength="30" /><br />
Password: <input type="password" name="password" maxlength="15" /><br />
Confirm Password: <input type="password" name="cpassword" maxlength="15" /><br />
<input type="hidden" name="MAX_FILE_SIZE" value="10000">
Choose your picture: <input type="file" name="upload"><p>
<input type="submit" name="submit" value="Register" /><br />
<p>
<center><h3><?php include("links.php"); ?></h3></center>
</form>
</body>
</html>
<?php
// relevant code snippets
$mypic = $_FILES['upload']['name'];
$temp = $_FILES['upload']['tmp_name'];
$type = $_FILES['upload']['type'];
$name = mysql_real_escape_string($_POST["name"]);
$email = mysql_real_escape_string($_POST["email"]);
$pw = mysql_real_escape_string($_POST["password"]);
$cpw = mysql_real_escape_string($_POST["cpassword"]);
echo $type."<br />";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.