I am using php to redirect my page. The problem that I am having is that I need it to carry the session variables with the redirect, and I am having trouble getting it to. if ($_GET['cat_no']){ $_SESSION['cat_no'] = $_GET['cat_no']; header('Location:http://www.idk.com/invoice.php?SID='.SID); }; PHP: I've looked at a few places in the net and that seems to be correct, but it doesn't work right.. any help is much appreciated.
Most probably a global variables problem. At the top of your code put something like this: $SID = $_GET['SID']; That's presuming before it redirects, the URL looks something like this: http://www.domain.com/invoice.php?SID=something Code (markup):
$session = session_name() . '=' . session_id(); header('Location: http://www.idk.com/invoice.php?' . $session); exit(); PHP: