-
-
Save stanigator/aa70d1d4fee856ac3e86 to your computer and use it in GitHub Desktop.
What's wrong with reading the type?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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