This one is an example from a book… i really don’t get it why i get this parse error… i followed everything but i still get this error… parse error: syntax error: unexpected ‘;’
What’s is the reason why it gets an error like this? and how to avoid it?
[php]
<?php // 13.5 - login.php $loggedin = false; $error = false; if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (!empty($_POST['email']) && !empty($_POST['password'])) { if ( (strtolower($_POST['email']) == '[email protected]') && ($_POST['password'] == 'testpass') ) { setcookie('Jane', 'Suan', time()+3600); $loggedin = true; } else { $error = 'The submitted email address and password do not match those on file!'; } } else { $error = 'Please make sure you enter both an email address and a password!';// this part i get the syntax error... } } define('TITLE', 'Login'); include('templates/header.html'); if ($error) { print '' . $error . '
'; } if ($loggedin) { print 'You are now logged in!
'; } else { print'Login Form
Email Address
Password
'; } include('templates/footer.html'); ?>[/php]