You are missing a quote line #11 >> date("H)

-----Original Message-----
From: Stephen Knight [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2003 12:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] I keep getting parse error, unexpected T_VARIABLE 


I trying to figure out PHP, and have been reading several books.  There
seems to be no ryhme or reason as to when to use single quotes or double
quotes.  Here is the simple code that I am trying to get to work.

<html>
<head>
<title>Greetings</title>
<body>
<?php
if ($name) {
print ('Good');
if(date("A")=="AM") {
print ('morning,');
} elseif ( ( date("H") >=12) and
(date("H) < 18)) {
print ('afternoon');
} else {
print ('evening,');
}
print ("$name");
print ('!\n');
} else {
print ('Please log in.\n');
}
?>
</body>
</html>

I have made repeated changes, such as adding single quotes, etc... but I
still continue to get the parse error, Unexpected T_Variable.

-- 
In Kindness
Stephen K. Knight
www.fmwebschool.com
1-800-353-7950
Professional FileMaker Web Services

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to