12-05-2017, 05:40 AM
I am try to secure a page but when a user with no permission visit the page its not redirecting to index
below is my code
<?php
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'usersc/includes/map_header.php';
require_once $abs_us_root.$us_url_root.'usersc/includes/user_navigation.php';
?>
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>
<div id="page-wrapper">
</div>
<?php
include $abs_us_root.$us_url_root.'usersc/includes/map_footer.php';
include $abs_us_root.$us_url_root.'users/includes/html_footer.php';
ERROR:
[05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Notice: Undefined variable: master_account in /home/t/users/helpers/us_helpers.php on line 438
[05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/t/users/helpers/us_helpers.php on line 438
?>
below is my code
<?php
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'usersc/includes/map_header.php';
require_once $abs_us_root.$us_url_root.'usersc/includes/user_navigation.php';
?>
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>
<div id="page-wrapper">
</div>
<?php
include $abs_us_root.$us_url_root.'usersc/includes/map_footer.php';
include $abs_us_root.$us_url_root.'users/includes/html_footer.php';
ERROR:
[05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Notice: Undefined variable: master_account in /home/t/users/helpers/us_helpers.php on line 438
[05-Dec-2017 14:38:47 Asia/Kuala_Lumpur] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/t/users/helpers/us_helpers.php on line 438
?>