I am fairly new to PHP and have began using a script that is basically Matt' Script Archive FormMail. However, it also allows you to attach a file to the other fields within the form. I have gotten the script to work as far as required fields, etc, but when I ATTACH A FILE, it gives me the following error:
Warning: Unable to create '/resume.txt': Permission denied in /home/hostin0/public_html/formmail.php on line 243Warning: Unable to create '/index.html': Permission denied in /home/hostin0/public_html/formmail.php on line 243
The line that it is refering to is int he following:
// check for a file if there is a file upload it
if ($file_name) {
if (!ereg("/$", $path_to_file))
$path_to_file = $path_to_file."/";
$location = $path_to_file.$file_name;
copy($file,$location);
unlink($file);
$content .= "Uploaded File: ".$path_to_file.$file_name."\n";
}
The form has all of the correct fields, so it is a problem with the script and I have no idea!
If anyone has any suggestions, pleas help!
Thanks,
David Young