lin Posted April 23, 2006 Share Posted April 23, 2006 hi alljust 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 Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted April 23, 2006 Share Posted April 23, 2006 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]cheersMark Quote Link to comment Share on other sites More sharing options...
lin Posted April 23, 2006 Author Share Posted April 23, 2006 [!--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]cheersMark[/quote]where does the url go which it redirect tothankspaul Quote Link to comment Share on other sites More sharing options...
lin Posted April 23, 2006 Author Share Posted April 23, 2006 [!--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 tothankspaul[/quote]dont worry i got it now cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.