this line:
if ($nomorepaymentstime > $timenow) and ($reason == "Pay Bill") {
should look like this:
if (($nomorepaymentstime > $timenow) and ($reason == "Pay Bill") ){
you forgot the brackets for the IF condition
in your case the condition stops before AND.hth t ----- Original Message ----- From: Henry To: [email protected] Sent: Wednesday, February 20, 2008 4:14 AM Subject: [php_mysql] Syntax error in Comparison $reason = $_POST['reason']; $timenow=date("Y-m-d H:i:s"); $closingtime=date("Y-m-d 16:30:00"); $openingtime=date("Y-m-d 08:30:00"); $nomorepaymentstime=date("Y-m-d 16:00:00"); What I am trying to do is: if ($nomorepaymentstime > $timenow) and ($reason == "Pay Bill") { echo "it is past the time for payments"; exit(); } I keep getting a syntax error on the comparison line. Can anyone tell me what I am doing wrong? Thanks [EMAIL PROTECTED] __________ NOD32 2887 (20080219) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com [Non-text portions of this message have been removed]
