Error with php code (file upload)
<p>I am getting the following errors:</p>

<p>Notice: Undefined index: theimage in C:\wamp\www_upload\index.php on line 5</p>

<p>Notice: Undefined index: theimage in C:\wamp\www_upload\index.php on line 7</p>

<p>Here is the code:</p>

<pre><code>&lt;?php

$target_path = "images/";

$target_path = $target_path . basename( $_FILES['theimage']['name']);

if(move_uploaded_file($_FILES['theimage']['tmp_name'], $target_path)) {
echo "&lt;p&gt;The image ".  basename( $_FILES['theimage']['name']). " has been uploaded&lt;/p&gt;";
} else{
echo "&lt;p&gt;There was an error uploading the image, please try again!&lt;/p&gt;";
}  

?&gt;

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;meta name="" content=""&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form enctype="multipart/form-data" action="index.php" method="POST"&gt;
&lt;fieldset&gt;
&lt;input name="theimage" type="file" /&gt;
&lt;input type="submit" value="Upload" /&gt;
&lt;/fieldset&gt;
&lt;/form&gt;



&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Any ideas on how to fix this please ?</p>
