the browser say that “This webpage has a redirect loop”
i tried to put die(); and exit(); but still the problem is still there.
what i am trying to do is when i click the link for p1_view_record.php it will check the level access and if the level access is equals to 2 it will continue to the p1_view_record.php page. if not it will go to not.php
here is my p1_view_record.php
[php]
<?php session_start(); if(!isset($_SESSION['isLogged'])){ header("location: main_login.php"); } ?> <?php session_start(); If ($_SESSION['userAccess']==2) { header("location: p1_view_record.php"); } else { header("location: not.php"); }; ?> L&K Billing System<body>
<div id="wrapper">
<?php include('includes/header.php'); ?>
<?php include('includes/nav.php'); ?>
<div id="content">
<h3>Product 1 Viewing Invoice</h3>
<p>
View invoice that was created. Please input invoice record number.
</p>
<form action="p1_view_inv.php" method="post" target="_blank">
<fieldset>
<div>
<input name="inv_rec_no" type="Text" placeholder="Invoice Record Number">
</div>
<input value="View Invoice" name="submit" type="submit">
</fieldset>
</form>
</div> <!-- end #content -->
<?php include('includes/p1_sidebar.php');
include('includes/footer.php'); ?>
</div> <!-- End #wrapper -->
</body>
[/php]