formmail.php parse error

2 replies
Joined: 03/19/2008
User offline. Last seen 41 weeks 6 days ago.

Any thoughts?

Parse error: parse error, unexpected T_IF in /home/content/d/r/h/drhollis/html/scripts/formmail.php on line 524

http://www.woodfiredhottub.com/contact.php
http://www.woodfiredhottub.com/scripts/formmail.php

Help aprecciated

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 03/28/2008
User offline. Last seen 40 weeks 2 days ago.

Hi

I have a similar situation here. I do not understand why it is saying syntax is wrong, as I do not know PHP yet.

Here is the error:

Parse error: syntax error, unexpected T_STRING, expecting ')' in
/home/......../formmail.php5 on line 48

Line 48 reads:

$valid_env = array('REMOTE_HOST', 'REMOTE_ADDR', 'REMOTE_USER', 'HTTP_USER_AGENT');

I know exactly what the error is saying, I just do not know what is wrong with the line it is pointing to or how to fix the syntax, or more like, what to change it to.

I appreciate your time. Thank you.

Joined: 06/04/2007
User offline. Last seen 20 hours 10 min ago.

I would check the line above #48. Most likely you didn't close a quote in one of the two array variables you modified.

-Andrew M Riley

User login