Enter destination file name: (leave blank if same name)
MYFORM; echo $myhead, $myform; } //end of show_form definition if(!isset($_POST[submit])) { show_form(); return; } $fname= ($_POST['fname']=="")?$HTTP_POST_FILES[myfile][name]:$_POST['fname']; $dirname= "/home/staff/celio/public_html/inf533-2004/php/"; if ($HTTP_POST_FILES['myfile']['size'] <=0){ print "File $fname not found/not accessible"; }else{ if (copy($HTTP_POST_FILES['myfile']['tmp_name'], $dirname . $fname)) print "
File $fname uploaded!"; else print "
File uploaded failure: check destination permissions"; } echo "