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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.