elseif syntax?
Posted: Sun Aug 05, 2007 10:57 am
Could anyone tell me why i get an error after the elseif?
Parse error: syntax error, unexpected '{' in /var/www/html/test.php on line 16
Driving me nuts as i can't see the problem.
Parse error: syntax error, unexpected '{' in /var/www/html/test.php on line 16
Code: Select all
if (!isset ($_POST['title']))
{
echo '<p>You must enter a TITLE!</p>';
}
elseif (strlen($_POST['title'] > 60)
{
echo '<p>Your TITLE is too long, consider shortening it to less than 60 chars.</p>';
}
else
{
echo 'all is good';
}