Jump to content

PARSE ERROR


mroberts46

Recommended Posts

I'm trying to figure out why my server is not recognizing that there is a break in the PHP code listed here:

 

<?php
include 'core/init.php';

if (empty($_POST)=== false) {
$username = $_POST['username'];
$password = $_POST['password'];
if (empty($username) === true || empty($password) === true) {
	$errors[] = 'You must enter username and password';
} else if (user_exists($username) === false) {
	$errors[] = 'Username not found';
} else if (user_active($username) === false) {
	$errors[] = 'You must activate your account before you may login';
} else {
	$login = login($username, $password);
	if ($login === false) {
		$errors[] = 'The username/password combination you have entered is incorrect';	
	} else {
		$_SESSION['user_id'] = $login;
		header('Location: index.php');
		exit();
	}
}

} else {
$errors[] = 'No data received.';
}
include 'includes/overall/header.php';
if (empty($errors) === false) (
?>
<div id="container">
	<h1>We tried to log you in but ...</h1>
<?php
	echo output_errors($errors);
}
?>
</div>

<?php
include 'includes/overall/footer.php';
?>

 

Instead of parsing the entire page, it stops at :

 

include 'includes/overall/header.php';
if (empty($errors) === false) (
?>

 

and throws this error:

 

Parse error: syntax error, unexpected ';' in /***/***/***/***/public_html/new_site/testing/login.php on line 29

 

Anyone has any ideas on how might I fix this issue?

Link to comment
https://forums.phpfreaks.com/topic/264586-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.