...

View Full Version : page redirect



kenny873
04-09-2003, 07:34 AM
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 "action", "s" ....

how can I get these values again after redirect....

what I did is:

$q_id = $_REQUEST['q_id']; // just as $action
$catID = $_REQUEST["catID"]; /// just as $s
$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....

missing-score
04-09-2003, 07:38 AM
Just a note, you should be using the $_GET array for URL variables, not $_REQUEST.

kenny873
04-09-2003, 07:49 AM
i did try replacing by GET , but still I can only get the first variable $catID not the second...

missing-score
04-09-2003, 04:46 PM
I noticed you are using single quotes '' for the first variable, and double for the second.

That could have something to do with it.

kenny873
04-10-2003, 02:39 AM
thanks for noticing and your help in this......

I tried to change the quote and still not working....

hmm....it is weird eh!

missing-score
04-10-2003, 07:27 AM
That is weird.

If you haven't already, try re-writing the code without looking at the current code. I do that sometimes, sometimes you fix your error without knowing it.

duniyadnd
04-10-2003, 07:48 PM
remove the underscore, see if that works, rename the variable in the URL without the underscore.

Duniyadnd



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum