if(isset($frm_upload)) {
if(!($frm_file==""||$frm_file=="none")) {
if (eregi(".jpg$",$frm_file_name)) {
$check_filename = "true";
}
else {
echo "Filen måste ha filformatet JPG.
";
$check_filename = "false";
}
if ($frm_file_size > 5000) {
echo "Filen kan vara max 500kb.
";
$check_filesize = "false";
}
else {
$check_filesize = "true";
}
if($check_filename == "true" && $check_filesize == "true") {
copy($frm_file,"tmp/$frm_file_name");
echo "Du har laddat upp filen $frm_file_name.
";
echo "Den var $frm_file_size bytes stor.";
}
}
}
?>