I keep getting parse error, unexpected T_VARIABLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux