Hallo,
I am trying to create session that works! This is the test admin (assign session) then afterward pass to input_image.php but I wonder why I cannot pass the index.php ?
admin.php
<?php
//$_SESSION['banner'] = $banner;
$_SESSION['banner'] = 'banner';
//$_SESSION['image_id'] = $image_id;
?>
<td><a href="input_image.php"><img src="images/<?php echo $data['newfilename']; ?>" height="150px" width="150px"><br><br>Lesson Class</a>
input_image.php
<?php
// Check if session is not registered, redirect back to main page.
// Put this code in first line of web page.
session_start();
if(!isset($_SESSION['banner']))
{
header("location:index.php");
exit;
}
?>