<?php else: ?>
Error is with line this.
Example usage of if-else in PHP:
<?php
$t = date("H");
if ($t < "20") {
echo "Have a good day!";
} else {
echo "Have a good night!";
}
?>
Reference:
PHP if...else...elseif Statements[
^]
Another example:
<?php
if ($a > $b):
echo $a." is greater than ".$b;
elseif ($a == $b):
echo $a." equals ".$b;
else:
echo $a." is neither greater than or equal to ".$b;
endif;
?>
Reference:
PHP: elseif/else if - Manual[
^]
Looking at above, your PHP code is having if-else in another way that is not correct, hence the error.
Try:
<?php include('config.php');
.
.
.
.
.
if(isset($_SESSION['data'])) :
.
.
.
.
else:
.
.
.
.
?>