In the following snippet of code, I get this PHP error:
Parse error: parse error in /home/[username]/public_html/contact.php on line 1
What has been bugging me for 3 hours was this script had worked at one time. If I yank out the if() else block, I get no errors. I put the if() back in and make something simple like if($a == true) (I set $a to true or false before hand) I get this parse error. I'm thinking its a server config issue at this point. Its PHP v4.2.3 w/globals enabled. I do have access to php.ini and can recompile Apache/PHP if need be.
Help?
Here's the code in question:
include_once('include/display.php');
head('contact', 'Contact');
$form = $_POST;
if($form['Action'] == 'submit')
{
$form['error'] = ValidateForm($form);
if($form['error'] == '')
{
SendEmail($form);
ShowComplete();
} // end if($form['error'] == '')
else
ShowForm($form);
} // end if($form['Action'] == 'submit')
else
ShowForm($form);
foot();
This would work:
include_once('include/display.php');
head('contact', 'Contact');
$form = $_POST;
ShowForm($form);
foot();
This has me really really stumped. Its possible I've been looking at it too long so any thoughts would be appreciated.