When I write page name in action attribute the file image does not upload
<p>When I write page name in action attribute the file image does not upload. If i write <code>"#"</code> in action page the image upload to target folder.
Please check the coding and mention mistake. Thanks in advance.</p>

<pre><code>&lt;form method="post" enctype="multipart/form-data" action="#"&gt;
&lt;input type="file" name="imageupload" align="center"&gt;
&lt;input type="submit" name="frmsubmit" value="Submit"&gt;
&lt;/form&gt;
&lt;?php
include 'includes/dbconnection.php';
if(isset($_POST['frmsubmit'])){
$image_name = $_FILES['imageupload']['name'];
$image_type = $_FILES['imageupload']['type'];
$image_size = $_FILES['imageupload']['size'];
$image_tmp = $_FILES['imageupload']['tmp_name'];
$target_dir = "dp/";
$path = $target_dir . $image_name;
move_uploaded_file($image_tmp, $path);
echo "The file ". basename( $_FILES["imageupload"]["name"]). " has been uploaded."; }?&gt;
</code></pre>