What have I not understood?
constant.php <?php define("FOO", "bar" ); echo FOO; /returns "bar" / ?>
<a href="test.php">test</a>
test.php <?php echo FOO; /returns FOO./ ?>
should return "bar" - right?
So why doesn't it?
are u including constant.php in test.php?
include("constant.php"); echo FOO; //should return BAR
Thank you.
I thought that Global Scope covered every script withing the htdoc folder.
darp wrote:Thank you. I thought that Global Scope covered every script withing the htdoc folder.
Nope, only the currently executing script. Once it's done processing, all data in memory is destroyed (thus the need for sessions and the $_SESSION array).
if you not want to use session,
you can try
1, <a href="test.php?foo=bar">test</a> 2, use http post 3, use cookie