When I develop web page Faced a problem which happen when use session
<?php
session_start();
ob_start();
if ($type == 'admin') {
$_SESSION['user_name'] = $User;
$_SESSION['UserType'] = 'admin';
header('Location: Main.php');
} else if ($type == 'manager' && $PID != "") {
$_SESSION['user_name'] = $User;
$_SESSION['UserType'] = 'manager';
$_SESSION['PID'] = $PID;
header('Location: MainPage.php');
}
?>
this Error in all my cases:
"Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies."