I have an index.php file where I login and move to another file called map.php from where on clicking button I reach inc.php.
The problem is on typing the link localhost/lilly/inc.php the unauthorised user or any public user should not be able to access this file, only the person logged in should!
How can I do this? I have read about using .htaccess etc but I have completely not understood anything from other articles..
I have used inc.php:
if(!defined('MyConst')) { die('Direct access not permitted'); } Map.php:
define('MyConst', TRUE);