I have created a rather larger html form and I would like the data to send to my email address.
I am using the POST method and thought my PHP was up to snuff. However, I now get the following error upon submission:
Parse error: syntax error, unexpected '}' in C:\www\mo\marinecforum\send_form_application.php on line 90.
I am having a hell of a time with this. Beyond the error above, I wonder if there is a better way to approach this?
Here is the PHP code.
Syntax error:
This
} mail($to, $email_subject, $message, $headers); ?>
to this...
mail($to, $email_subject, $message, $headers);
Also when you write "$content =" you are resetting variable, you should append by "$content .="
Edit:
Here is entire code, that will probably work... http://sorskod.com/6ERZ455T
EDIT2:
Rename
Email Address <input type="text" name="address" />
To
Email Address <input type="text" name="email" />
OR change $_POST["email"] to $_POST["address"] in PHP file.
EDIT3:
Configure mail.
ini_set("SMTP","mail.marineconomicforum.org");
ini_set("smtp_port","25");
ini_set('sendmail_from', 'alex@marineconomicforum.org');
You should count your opening and closing {
's and }
's. You have 1 opening {
and 3 closing }
's so that's 2 too much.
If you go here to your script. You have one { on line 2 and three } on lines 51, 90, 107
You will need to change one of your } to { in order to have opened and closed every set {}.