so if I have a file:
test1.php
which has a variable $var1 = $_POST['username'];
is there anyway I can access that variable in another file:
test2.php
echo $var1;
without having to set a session? as currently It produces an undefined error
so if I have a file:
which has a variable $var1 = $_POST['username'];
is there anyway I can access that variable in another file:
echo $var1;
without having to set a session? as currently It produces an undefined error
You can use: include 'test1.php';
in test2.php.
Then echo $var1;
in test2.php.