Why is my php script not echoing the result into the original page?
<p>I currently have the following code, for a page containing an upload form</p>

<pre><code>&lt;form enctype="multipart/form-data" action="uploader.php" method="POST"&gt;
&lt;input type="hidden" name="MAX_FILE_SIZE" value="10000000" /&gt;
Choose a file to upload: &lt;input name="uploadedfile" type="file" /&gt;&lt;br /&gt;
&lt;input type="submit" value="Upload File" /&gt;

&lt;/form&gt;

&lt;? include('uploader.php'); ?&gt;
</code></pre>

<p>I then have the file uploader.php saved within the same directory. This file contains the following code:</p>

<pre><code>&lt;?php

if( $_POST ){
// Where the file is going to be placed 
$target_path = "uploads/";

/* Add the original filename to our target path.  
Result is "uploads/filename.extension" */
$target_path = $target_path .time() .basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The  &lt;a href=" . $target_path . "&gt;file&lt;/a&gt; has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}

}

?&gt;
</code></pre>

<p>My intention was to have it echo <code>"The  &lt;a href=" . $target_path . "&gt;file&lt;/a&gt; has been uploaded";</code> on the same page, but instead it redirects to another page to display this message.</p>

<p>Why is this happening?</p>