i want to make change my default menus after login passed and I have some code for my app like this
index.php
<?php session_start(); ?>
<html>
<head></head>
<body>
<ul>
<?php if($_SESSION['loggedIn'] == '1' ): ?>
<li><a href="../templates/" title="Home" id="activated">Home</a></li>
<li><a href="catalog.html" title="Catalog" >Catalog</a></li>
<li><a href="signup-for-partners.html" title="Partners">Become Our Partner</a></li>
<li><a href="About-us.html" title="About Us">About Us</a></li>
<?php else: ?>
<li><a href="../templates/" title="" >Home</a></li>
<li><a href="account.html" title="" >My Account</a></li>
<li><a href="catalog.html" title="" >Catalog</a></li>
<li><a href="logout.php" title="" >logout</a></li>
<?php endif; ?>
</ul>
</body> </html>
and this is my process with captcha
<?php
session_start();
include 'conection.php';
if($_POST['captcha'] == $_SESSION['captcha']){
$username = $_POST['UserID'];
$password =$_POST['Password'];
$sql = "select * from login where username='".$username."' and password='".$password."'";
#echo $sql."<br />";
$query = mysql_query($sql) or die (mysql_error());
if($query){
$row = mysql_num_rows($query);
if($row > 0){
$_SESSION['loggedIn']='1';
$_SESSION['UserID']=$username;
header('Location: ../templates/');
}
else {
header('Location: error.php');
}
}
}
else{
header('Location: ../templates/');
}
?>
and its appear error like this
Notice: Undefined index: loggedIn in C:\xampp\htdocs\Templates\index.php on line 78
the loggedIn just defined in process.php
why its not working?