You only want the php code to execute once the user has pressed the submit(Upload) button.
Put an 'if statement' around the php code: (see in red below)
if (isset($_POST['submit'])) {
$name = @$_FILES["myfile"] ["name"];
echo '</tr> <table/>'; |
}
Then add the name="submit" to the button:
<input type="submit" name="submit" value="Upload"/>