Jump to content

querystring question


lin

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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.