peter_coop
asked on
php syntax error
hi. i am stumped as to why this script is giving a syntax error? the error is
Parse error: syntax error, unexpected '{' on line 183
The code below is the area around 183. it looks ok 2 me but obviously it is not. anyone see where i went wrong? cheers
Parse error: syntax error, unexpected '{' on line 183
The code below is the area around 183. it looks ok 2 me but obviously it is not. anyone see where i went wrong? cheers
<?php
if (isset($_POST['prez']) && (isset($_POST['Intext'])) {
include 'transsent.php';
$to = "xxx@whatever.com";
$subject = "Form Enquiry";
$message = "You have an enquiry from $name for a whatever.\n\nEmail: $email";
$headers = "From: $email";
mail($to, $subject, $message, $headers);
}
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You have one bracket open && (isset($_POST['lntext']
You either need to close this bracket or remove it:
if (isset($_POST['prez']) && isset($_POST['Intext'])) {
include 'transsent.php';
$to = "xxx@whatever.com";
$subject = "Form Enquiry";
$message = "You have an enquiry from $name for a whatever.\n\nEmail: $email";
$headers = "From: $email";
mail($to, $subject, $message, $headers);
}
You either need to close this bracket or remove it:
if (isset($_POST['prez']) && isset($_POST['Intext'])) {
include 'transsent.php';
$to = "xxx@whatever.com";
$subject = "Form Enquiry";
$message = "You have an enquiry from $name for a whatever.\n\nEmail: $email";
$headers = "From: $email";
mail($to, $subject, $message, $headers);
}
ASKER
thx once again
if (isset($_POST['prez']) && (isset($_POST['Intext'])))