Forum Moderators: coopster
defined.php
--------------------
<?php
defined('_test') or die('no direct access');
?>
---------------------
I want the page jump to defined.php if the user input correct password.
How can I pass the value of constant "_test" from define.php to defined.php after the jump, without include or require, so I can keep the defined.php from direct vivist.
On a side note, if you're trying to create a log in script, it is easier and more practical to use variables instead of constants. Constants are usually reserved for website settings, such as languages and other website-wide configurations.
example..
<?
elseif($password=='passwd'){
$_SESSION['userId'] = $uid;
header("location: defined.php");
}
?>