I have page with this code:
page.php?domain=name
Code: Select all
<?php $domain = $_GET['domain']; $redirect = "?domain=" . $domain; ?>
<?php include '../includes/mod_users.php$redirect'; ?>
The two PHP codes are actually inside of HTML code, that is why they are separated.
So, when I echo the second line, it comes out like this:
Code: Select all
include '../includes/mod_users.php?domain=name'
That is correct. However, when the actual page runs as an include, the variable is not working, it comes out like:
Code: Select all
include '../includes/mod_users.php$redirect'
What am I doing wrong? The purpose is to pass a variable from include to include, because each include needs a URL variable. Any ideas?