title: I am unable to upload file to my local host folder in php
body: <p>I have the follwing code</p>
  <pre><code>&lt;form enctype=&quot;multipart/form-data&quot; action=&quot;upload.php&quot; method=&quot;POST&quot;&gt;
   Please choose a file: &lt;input name=&quot;uploaded&quot; type=&quot;file&quot; /&gt;&lt;br /&gt;
   &lt;input type=&quot;submit&quot; value=&quot;Upload&quot; /&gt;
   &lt;/form&gt;  
  
  &lt;?php 
   $target = &quot;upload/&quot;; 
   $target = $target . basename( $_FILES['uploaded']['name']) ; 
   $ok=1; 
   if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
   {
   echo &quot;The file &quot;. basename( $_FILES['uploadedfile']['name']). &quot; has been uploaded&quot;;
   } 
   else {
   echo &quot;Sorry, there was a problem uploading your file.&quot;;
   }
   ?&gt; 
  </code></pre>
  <p>my page is in <a href="http://local.host/nausal/upload.php" rel="nofollow noreferrer">http://local.host/nausal/upload.php</a></p>
  <p>now I am having the follwing error though i have created a folder in site with name upload.</p>
  <blockquote>
  <p>Notice: Undefined index: uploaded in C:\wamp\www\Nausal\upload.php on line 15</p>
  <p>Notice: Undefined index: uploaded in C:\wamp\www\Nausal\upload.php on line 17
  Sorry, there was a problem uploading your file.</p>
  </blockquote>