your form should begin like this:
<form enctype="multipart/form-data" action="/b/plaver.php"method="post">
Second: U should not mix the gloabal $userfile and $FILES . It's better to always access the uploaded file via $FILES["userfile"].
Third: What about this if-statement?? I don't see the difference in the else-section.
Your code might look like this:
<?php
if ($_FILES["userfile"])
{
//The file to be uploaded
$tmpfile = "images/emps/".$_FILES["userfile"]["name"];
if(!file_exists($tmpfile))
{
move_uploaded_file($_FILES['userfile']['tmp_name'], $tmp_name);
}
else
{
// What's different here?? U have to chekc it out once more
move_uploaded_file($_FILES['userfile']['tmp_name'], $tmp_name);
}
//Update the database table for the new record
$db = mysql_connect($Host,$Gebruiker,$Passwoord);
$sql="UPDATE $tabelnaam SET plaatje1='" . $_FILES["userfile"]["tmp_name"] ."';";
mysql_query($sql, $db);
}
?>
There can be still something wrong with your code cause I did not test ist, but I hope my code gave u a starting point
Hasta siempre