Cannot move_uploaded_file not even executing
<p>I am fairly new to PHP and am trying to upload an image via the move_uploaded_file function, please look at the section of code and please help. By the way, I am using IE8 if it is nessecary:</p>

<pre><code>$name = $_FILES['fileToUpload']['name'];
$basename = @basename($name);
$msg .= " File Name: ". $_FILES['fileToUpload']['name'] .", ";
$msg .= " File Size: ". @filesize($_FILES['fileToUpload']['tmp_name']);
if (isset($_GET['id'])) {
 $id = $_GET['id'];
 //check and/or create dir for user images
 if (!is_dir("uploads\\".$id."\\images")) {
 $dir = "uploads\\".$id."\\images";
 mkdir($dir, 0777);
 if (!move_uploaded_file($basename, $dir)){$msg = "COULD NOT MOVE FILE";}
}
}
</code></pre>

<p>The $msg "COULD NOT MOVE FILE" does not execute and the file has not been moved
Thanks in advance.</p>
