Ok..here is what I have, where is the best place to put this code?
<?
if ($userfile=="none")
{
echo "Problem: no file uploaded";
exit;
}
if ($userfile_size==0)
{
echo "Problem: uploaded file has zero size";
exit;
}
if (!is_uploaded_file($userfile))
{
echo "Problem: nice try, but file must originate on your machine!";
exit;
}
$upfile="/home/somedirectory/".$userfile_name;
if ( !copy($userfile, $upfile))
{
echo "Problem: Could not move file into that directory";
exit;
}
echo "file uploaded successfully!<BR><BR>"
?>