Anda memerlukan enctype=multipart/form-data dalam deklarasi formulir Anda. Dan akses file melalui variabel $_FILES alih-alih variabel $_POST. Seperti:
<form action="testimage1.php" method="post" enctype="multipart/form-data">
<input name="uploadimage" type="file" />
</form>
<?php
$filename = $_FILES['uploadimage']['tmp_name'];
?>