OK now I am getting this error
Warning: Unable to create 'agents/181152339': Permission denied in /home/freesite/public_html/repro/repro_functions.inc on line 18
failed to copy file /tmp/phpRF1dRE to agents/181152339
*************Here is my form
<?$file_id = date("Hisz");?>
<form enctype="multipart/form-data" action="<?=$PHP_SELF?>?session_id=<?=$session_id?>&action=<?=$action?>" method="post">
<input type="hidden" name=MAX_FILE_SIZE value=100000000>
<input type="File" name="userfile" size="30" maxlength="255" accept="image/jpeg, image/pjpeg">
<input type="hidden" name="newname" size="30" maxlength="255" value="<?echo $file_id ?>">
</form>
******************Here is my script
function do_upload($userfile,$newname)
{
$new_file = "agents/".$newname;
if (!copy($userfile, $new_file)) echo "failed to copy file $userfile to $new_file\n";
return;
}
Whats the Problem!!!!!!!!!!!!!!!!!!!