Link to home
Start Free TrialLog in
Avatar of peter_coop
peter_coopFlag for United Kingdom of Great Britain and Northern Ireland

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

<?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);
		} 
?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try

if (isset($_POST['prez']) && (isset($_POST['Intext']))) {
Avatar of sc_84
sc_84

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);
            }
Avatar of peter_coop

ASKER

thx once again