Kavoir.com Posted November 20, 2009 Report Posted November 20, 2009 There's a login form on page A: http://www.example.com/A.html The 'action' attribute of which is: action="/B.html" So when someone logs in with the form on A.html, the data will be submitted to / visitor redirected to B.html. Now what I want is: there's an on /C.html, framing B.html, is there any way so that when someone logs in with the form on A.html, the visitor is redirected to C.html and the login details is submitted to B.html that's framed on C.html in the ? So after the person logs in from A.html, he arrives at C.html with the actual CP dashboard framed in an . I have absolutely no clue in achieving this. Maybe the form will be submitted to C.html first and C.html submits the login details to B.html (framed in C.html) via JavaScript? How? Quote
smoughan Posted November 22, 2009 Report Posted November 22, 2009 You could use the PHP session variables to do it, ie. when the form is submitted to page C, it starts a session and saves the values. When page B is loaded, it can read those values from the users PHP session and authenticate. The easier way to to it is pass the details straight to page B and let it do the login, using a piece of javascript on page B you can check to see if a frame is present, and if not, redirect. As the user should already have a session at this point, it should work fine. Quote
Kavoir.com Posted December 16, 2009 Author Report Posted December 16, 2009 You could use the PHP session variables to do it, ie. when the form is submitted to page C, it starts a session and saves the values. When page B is loaded, it can read those values from the users PHP session and authenticate. The easier way to to it is pass the details straight to page B and let it do the login, using a piece of javascript on page B you can check to see if a frame is present, and if not, redirect. As the user should already have a session at this point, it should work fine. Good idea! Thanks. Quote
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.
Note: Your post will require moderator approval before it will be visible.