Jump to content

Archived

This topic is now archived and is closed to further replies.

lin

querystring question

Recommended Posts

hi all


just a question about query strings. I know how to make simple ones but how would i make a querystring like:

[a href=\"http://www.domain.com/account/login/?continue=redirect_url\" target=\"_blank\"]http://www.domain.com/account/login/?continue=redirect_url[/a]

i am guessing index page is in the /login/ folder which display the login part but on the last bit how does the browser know to redirect to the redirect_url when login is successful.

thanks

lin

Share this post


Link to post
Share on other sites
if you omit the 'index.php'/'index.htm' part, they will just default to that. so in your above example, it is equivalent of:
[a href=\"http://www.domain.com/account/login/index.php?continue=redirect_url\" target=\"_blank\"]http://www.domain.com/account/login/?continue=redirect_url[/a]

as for redirecting afterwards, the $_GET array and 'header' function is used.

[code]
$redirect_to = $_GET['continue'];
header("Location: $redirect_to");
exit;
[/code]

cheers
Mark

Share this post


Link to post
Share on other sites
[!--quoteo(post=367690:date=Apr 23 2006, 09:37 AM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Apr 23 2006, 09:37 AM) [snapback]367690[/snapback][/div][div class=\'quotemain\'][!--quotec--]
if you omit the 'index.php'/'index.htm' part, they will just default to that. so in your above example, it is equivalent of:
[a href=\"http://www.domain.com/account/login/index.php?continue=redirect_url\" target=\"_blank\"]http://www.domain.com/account/login/?continue=redirect_url[/a]

as for redirecting afterwards, the $_GET array and 'header' function is used.

[code]
$redirect_to = $_GET['continue'];
header("Location: $redirect_to");
exit;
[/code]

cheers
Mark
[/quote]

where does the url go which it redirect to

thanks

paul

Share this post


Link to post
Share on other sites
[!--quoteo(post=367699:date=Apr 23 2006, 10:16 AM:name=lin)--][div class=\'quotetop\']QUOTE(lin @ Apr 23 2006, 10:16 AM) [snapback]367699[/snapback][/div][div class=\'quotemain\'][!--quotec--]
where does the url go which it redirect to

thanks

paul
[/quote]

dont worry i got it now cheers

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.