Q:

Image upload form in PHP does nothing, no error

I have the following PHP code that I am using to upload an image to MySQL.  When I click submit nothing happens.  
include ("connect.php");
session_start();
$login = $_SESSION['wname'];

if((@$_POST['submit'])&&(isset($_FILES["myfile"]))){
  // properties of the uploaded file
  $name = $_FILES["myfile"]["name"];
  $type = $_FILES["myfile"]["type"];
  $size = $_FILES["myfile"]["size"];
  $temp = $_FILES["myfile"]["tmp_name"];
  $error = $_FILES["myfile"]["error"];

  if($name){
    die("Error uploading file!  Code $error."); 
  } else {
    $place = "avatars/$name";
    move_uploaded_file($tmp_name,$place);
    $query = mysql_query("UPDATE page SET pid_image_name = '$place' WHERE wname = '$login' ");
    die("upload complete <a href='index.php'>View image</a>");
    echo "Upload complete!"; 
  }
} else {
  die("select a file"); 
}

Here's my form:
<form action='up.php' method='POST' enctype='multipart/form'> 
<input type='file' name='myfile'>
<p> <input type='submit' name='submit' value="upload">

What am I doing wrong? 

A:

Another important parameter to check out in php.ini is post_max_size.  If you set upload_max_filesize > post_max_size the result is that no data is written to $_POST nor $_FILES for files which sizes exceed post_max_size but are below upload_max_filesize

