I have to create a form that submits to its self with an if/else routine.
Can someone tell me what I have done wrong?
I had it working, and now its not
[php]
<?php echo '<?xml version="1.1" encoding="utf-8"?>'; ?> ACME Widget Company.
ACME Online Feedback Form
<?php // Handle POST method and check to see if POST is true or false // Declare variables for the form // Check to see if variables have value if(!empty($_POST['message'])) { $subject = $_POST['subject']; $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; // Amalgamate the variables into one message. $message = "From $name ($email) regarding $subjectnnComments:nn$comments"; // Email request to ACME representative mail("[email protected]", "Feedback", $message); // Thank you and action message for the user echo "Thank You, your message has been forwarded to an ACME representative.
You will be contacted shortly.
n";
}
else
{
// open else statement
?>
How can we help you?
Name:
Email:
Subject:
Comments:
<?php // close else statement } ?>