I am trying to make a new post which requires user to login...just like the one used in here....
as you see, in the URL above, there is some value to pass "mode", "f" ....
how can I get these values again after redirect....
what I did is:
$q_id = $_REQUEST['q_id']; // just as $mode
$catID = $_REQUEST["catID"]; /// just as $f
$fromPage = "http://"
$fromPage .= $_SERVER[PHP_SELF];
if (!chkLogin) then
header ("Location: ".WWW_HTTPS_ROOT."zh_hk/main/prompt_login.php?fromPage=".$fromPage."?catID=".$catID."&q_id=".$q_id);
but then I only get $catID and NOT $q_id...
how can I get both value again....
page redirect
Moderator: General Moderators
-
bionicdonkey
- Forum Contributor
- Posts: 132
- Joined: Fri Jan 31, 2003 2:28 am
- Location: Sydney, Australia
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Try doing:
to see all of the variables from the URL.
You should be able to access the individual vars as:
if they've come out of a query string that looks something like:
Mac
Code: Select all
echo '<pre>';
print_r($_GET);
echo '</pre>';You should be able to access the individual vars as:
Code: Select all
$q_id = $_GET['q_id'];
$catID = $_GET["catID"];Code: Select all
?q_id=something&catID=something_else