Hello.

I've defined a global constant in an index.php file. That file 'includes' a .php file. That 'included' .php file contains a hyperlink that displays in a 'target' window.

The constant is recognized in the included file but not carried through to the new 'target' window. How come?

I used the print() to confirm its value. The constant's 'name' instead of its value was printed in the new window.

EDIT: Should a query string be used instead of a constant? Is there another (better) method?

Thanks.

    That "new 'target' window" don't have included the index.php file or is not included from index.php file, so ofc it wont be recognize, u should re-declare the constant there or u should sent the constant value to that "new 'target' window" by GET or POST ...

    Try something like this in the "new 'target' window":

    if(!defined('_const_name')) define('_const_name','_const_value');
      Write a Reply...