i have this input form
echo("<form enctype='multipart/form-data' action='test.php' method=post>");
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%' >";
echo "<tr>";
echo "<td width='26%' height='18'><font face='Arial,helvetica,sans-serif' size='2' color='#330000'>photo</font></td>";
echo "<td width='74%' height='18' colspan='2'><input type='file' name='userfile' size='20' maxlength='70'></td>";
echo "</tr>";
echo "</table>";
and then i have tried to read submitted value on form above on script test.php
$userfile=$_POST[userfile];
if($userfile!=""){
if(!copy($userfile,$destination.$nik.'.jpg')){
echo "there was an error";
exit;
}
but i have got problem here, variable $userfile not get submited value from the input form so if i try to
echo $userfile;
i got nothing
i have no problem with other input type element like input type=text since i could got the variable value properly
i have tested to eliminate "enctype='multipart/form-data " from my input form
and then i could get $userfile value, but there was still a problem because its value just a final filename and not its fullpath to the filename as i want
any help or suggestion will be appreciate