I am trying to make a form with a OPTIONAL file upload field. I read in a previous post that you could fix the problem of the file upload field being required by altering some of the code.
I think I found the code you were talking about but want to make sure I dont change anything vital to the script.
The file was process3.bak.php and the code i was going to remove was
I am trying to make a form with a OPTIONAL file upload field. I read in a previous post that you could fix the problem of the file upload field being required by altering some of the code.
I think I found the code you were talking about but want to make sure I dont change anything vital to the script.
The file was process3.bak.php and the code i was going to remove was
//Check upload success
for($i=0;$i<sizeof($name);$i++)
{
if($type[$i]=="file_upload")
{
$form_process .= "if(!is_uploaded_file(\$HTTP_POST_FILES['".$use_name[$i]."']['tmp_name'])){\n";
$form_process .= "\$error.=\"<li>The file, \".\$HTTP_POST_FILES['".$use_name[$i]."']['name'].\", was not uploaded!\";\n";
$form_process .= "\$errors=1;\n}\n";
}
}
Please let me know if this solution will fix my problem