I have two page: rooms.php and reservation.php
User can only access to reservation.php via rooms.php
I have used define('NOT',1); and if (!defined('NOT')) exit('no direct!');
But when user goes from rooms.php to reservation.php there is error message?
Why define function not working? Thanks in advance
I have two page: rooms.php and reservation.php User can only access to reservation.php via
Share
Assuming you are calling
rooms.phpfirst and go toreservation.phpvia a link:The constant will be lost after you access the other page. You should store the value in a session:
A PHP file a script that gets executed every time you call it. But that also means that all variables, constants are lost after the script was executed. But sessions are for preserving data through multiple page calls.