Assistance with a homework assignment


#1

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("rc_spitzig@telus.net", "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 } ?>

ACME Widget Company, Unit 140 - 3080 Townline Road, Abbotsford, BC - 604-855-1571 - email Colleen Spitzig  

[/php] [b]Admin Edit: Added PHP code tags for readability. Please see http://phphelp.com/guidlelines.php for posting guidelines.[/b]

#2

What exactly isn’t it doing that it should? Is it not submitting, is it submitting and giving you an error message?


#3

It turned out that I had an incorrect test for the if set up.

I’m good now, thanks