homepage Welcome to WebmasterWorld Guest from 54.242.112.71
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
return url
jp12




msg:4624670
 1:41 am on Nov 20, 2013 (gmt 0)

Is there anything similar to .asp return url in php or another language?

 

penders




msg:4624767
 12:02 pm on Nov 20, 2013 (gmt 0)

What exactly does "return url" do in .asp?

Are you wanting to return the requested URL or maybe redirect the user to an alternative URL?

jp12




msg:4625187
 7:37 pm on Nov 21, 2013 (gmt 0)

so you have a page that has says terms/conditions on it that has to be read and agreed to before allowing you to goto the page that you are trying to view

penders




msg:4625224
 9:16 pm on Nov 21, 2013 (gmt 0)

There are numerous ways you could implement this in PHP, but it would at the very least require writing a short script. (In any language I imagine?) HTML form -> Process -> Maintain state (in cookie/session).

Does classic ASP really have something like this built-in?!

jp12




msg:4625230
 9:47 pm on Nov 21, 2013 (gmt 0)

it does [msdn.microsoft.com...]

aakk9999




msg:4625238
 10:04 pm on Nov 21, 2013 (gmt 0)

I think I know what you are talking about - this is often used on login pages, where, if you want to access certain page, you are sent to login page, and after you log in, you are then sent to the page you tried to visit.

I did not realise this is inbuilt function in ASP and .NET, but from the "outside", what I am seeing in URL of the (for example login script) is something like:

http://www.example.com/login.aspx?returnURL=https%3a%2f%2fwww.example.com%2fsome-target-page.aspx

From the login.aspx page, the POST is executed to the above URL (to the login.aspx script), which, after checking the credentials are ok, redirects to www.example.com/some-target-page.aspx specified within the returnURL parameter

I am not aware if this exists as a function in PHP, but it can be coded so that if you get returnURL (or similar named parameter), your script performs a redirect to a location as defined in the parameter if the credentials are ok.

Or alternatively do it as penders said it above.

jp12




msg:4625242
 10:28 pm on Nov 21, 2013 (gmt 0)

yes, i will try it as penders suggested, any thoughts on the short script?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved