Ok this is how my script looks like at the moment. The file is sent to the folder in question but I dont know how to rename it! How do I for example rename it to test.php when uploading it??
<input type=hidden name=MAX_FILE_SIZE value=930000000 />
<input name=userfile type=file />
<input type=\"submit\" value=\"Submit Picture\" name=\"step\"><input type=\"reset\" value=\"Reset\" name=\"reset\"></TD></TR>
</FORM>";
if ($step)
{
$uploaddir = '/home/blabla/pics/';
$uploadfile = $uploaddir . $HTTP_POST_FILES['userfile']['name'];
print "$HTTP_POST_FILES";
if (move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], $uploadfile)) {
}