using a session variable in a redirect URL
I have an insert record page which, once a record has been inserted, I want to redirect back to the main results page. The user is logged in as a Super Admin, goes to a page with a list of Accountants and then clicks a link beside the Accountant name to access their client list. They then need to add clients to the database. I have a session variable Accountant_ID, so the client results page is as follows: acclients_results.php?AccountantID=12
The redirect link in the Insert Record page is currently:
$WA_redirectURL = "acclients_results.php?AccountantID=[Insert_ID]";
However that Insert_ID is passing the Client ID and not the Accountant ID, so I'll get something like acclients_results.php?AccountantID=687 rather than acclients_results.php?AccountantID=12. How can I pass the AccountantID into the URL?