File not found when submitting form

Using this as an validator/acknowledgment page upon form submission and getting Not Found [CFN #0005]. The host insists that it’s an issue with my coding. I’ve run the coding above the HTML through a code checker and it checks out fine. The form uses method=post. The acknowledgment page (abbreviating the html, which I’m confident is fine):

<?php if (isset($_POST['send'])) { $to = '[email protected]'; $subject = 'Message from web site'; $message = 'Name: ' ['name']; $message = 'Email: ' ['email']; $message = 'Comments: ' ['comments']; $headers = "From: [email protected]\r\n"; $headers .='Content-Type: text/plain; charset=utf-8'; $email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL); if ($email){ $headers .= "\r\nReply-To: $email"; } $success = mail($to, $subject, $message, $headers, '[email protected]'); } ?>

(html head and body tag here)

<?php if (isset($success && $success) { ?>

We'll get back to you soon.

<?php } else { ?>

There was a problem sending your message. Would you mind trying again?

<?php } ?>

(ending html tags below this)
The file name and path in my contact form page are fine, it’s not that. I get the same thing if I remove the HTML. The only other thread I see on this topic suggests that PHP isn’t installed on the server, and Earthlink is insisting it’s all systems go on their end. Nothing in the .htaccess file getting in the way.

Thanks for having a look!

Are you seeing a “not found” in your browser? If that’s the case then your problem is at the web server level, not your code.

What are the names of your PHP files, and what is the html code of your form?

That’s what I thought, but the host insists that it’s my code (called twice just in case). For php file acknowledge.php, here’s the form. I’ve tried it with the php file in the root directory, same result:

<form method="post" action="https://www.ourdomain.com/cgi-bin/acknowledge.php">

<label for="name" style="font-family: Verdana, sans-serif; font-size:small;">Name:</label><br /><input type="text" name="name" id="name" size="35" /><br /><br />
<label for="email" style="font-family: Verdana, sans-serif; font-size:small;">Email address:</label><br /><input type="text" name="email" id="email" size="35" /><br /><br />
<label for="comments" style="font-family: Verdana, sans-serif; font-size:small;">Message:</label><br /><textarea name="comments" id="comments" cols="35" rows="10"></textarea><br /><br />
		<input type="submit" name="send" value="Send" />
		<input type="reset" value="Clear form" />
</form>

Ok. Can you open “https://www.ourdomain.com/cgi-bin/acknowledge.php” directly in the browser? If not, can you open “https://www.ourdomain.com/acknowledge.php”? Sometimes the cgi-bin folder name is not included in the URL.

Sponsor our Newsletter | Privacy Policy | Terms of Service