php mailer (missing brackets?)

This is setting up a swift mail script, I'm getting this error.
Parse error: syntax error, unexpected $end in mailer.php on line 176 (last line).

Looks like I'm supposed to be missing a bracket, but I can't find it...I need some different eyes on this.

mailer.php
LVL 2
ststestingAsked:
Who is Participating?
 
ststestingAuthor Commented:
Looks like there were two things, I missed a ; on line 121 $to =

And the EOD; cannot be indented.
0
 
AielloJCommented:
ststesting:

The Header directive is an HTML directive not PHP.  It belongs outside the closing PHP tag.  Try the code below.

$result = $mailer->send($message);
?>

header("Location: HTTP://domain/thank-you.html")

Best regards,

AielloJ
0
 
ststestingAuthor Commented:
Thanks for the help, I moved that below, or just deleted it for now. My last line of code ($result...) is still highlighted like it didn't fix the problem.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Scott MadeiraCommented:
In your code the EOD; on lines 95, 102, etc. must be in the first column.  It cannot be indented.
0
 
Dave BaldwinFixer of ProblemsCommented:
Not true, that header is a PHP function.  It is correct in your posted code. http://us1.php.net/manual/en/function.header.php

I'm not sure what is causing the error you're getting but all of your 'if' and 'elseif' statements are wrong because a single '=' is an assignment, not a comparison.  Should be:

if ($hiddest == 'contact')

Open in new window

0
 
ststestingAuthor Commented:
figured out what I was missing
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.