how do i send a php variable (boolean) with a redirect. For example a flag is set if a condition is true
if($url = 'someurl.com'){
$flag = true;
header('Location: newpage.php?$flag');
exit();
}
then mypage.php needs to check if its true or false to execute a function
i tried this but it doesn't work
header('Location: mypage.php?$flag');
perhaps there is a better way of doing it?, this is the 2nd redirect on the page, the first redirect checks checks for a login, then it proceeds to check the $flag variable, no output has been done at this stage
thanks in advance for any advice