HTML Form and PHP not working.

[b]Greetings! Please help! I have created a form in HTML and it is connected to a PHP to process it. It is not working and I can not figure out why. Please help! I am working in Dreamweaver. My coding is below.

Form:[/b]

PHP:

<?php // From $header="from: $name <$mail_from>"; // Phone $phone ="$phone"; // Mail of sender $mail_from="$customer_mail"; //Preferred Method $contact = "$_Post['contact']" // Contact subject $subject ="$subject"; // Comment $message="$detail"; // Enter your email address //Change to [email protected] $to ='[email protected]'; $send_contact=mail($header,$phone,$mail_from,$contact,$subject,$message); // Check, if message sent to your email // display message "Thank you we've recived your information." if($send_contact){ echo "Thank you for contacting Collar Link Jewelry. We will be back in contact with you with in 24-48 hours. "; } else { echo "ERROR"; } ?>
Name
:
Phone
:
Email
:
Preferred Method of Contact
:
Phone
Email
Subject
:
Comment
:
   

Is your server configured for the mail function?

You can simplify and get meaningful errors from you code, for the purpose of debugging anyway.

[php]

try {

mail($header,$phone,$mail_from,$contact,$subject,$message)
// Try to send the message. If it works it will continue and print the thank you.
// If not, it goes to the catch statement showing why.

echo “Thank you for contacting Collar Link Jewelry. We will be back in contact with you with in 24-48 hours.”;

} catch ( Exception $e ) {

echo "ERROR: " . $e->getMessage(); // On error print Why

}
[/php]

What does not working mean? What happens when you try it? What error messages are you getting?

This is the Error I am receiving:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

What is the message in the error log?

Sponsor our Newsletter | Privacy Policy | Terms of Service