+ Reply to Thread
Results 1 to 4 of 4




  

Thread: Is there any way to do this in PHP (or with a combination of JS)?

      
  1. #1
    Jedi Master yangyang is on a distinguished road yangyang's Avatar
    Join Date
    April 27, 2008
    Posts
    75
    Rep Power
    5
    Feedback Score
    0

    Default Is there any way to do this in PHP (or with a combination of JS)?

    There's a login form on page A: 404 Not Found

    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 <iframe></iframe> 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 <iframe></iframe>? So after the person logs in from A.html, he arrives at C.html with the actual CP dashboard framed in an <iframe>.

    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?
    Scraped databases as quick content solutions for your websites.
    We are blogging at Kavoir. You may also be interested in this economics blog. :Icky:

  2. #2
    Jedi Master IsaacR is on a distinguished road IsaacR's Avatar
    Join Date
    October 9, 2009
    Posts
    53
    Rep Power
    3
    Feedback Score
    0

    Default Re: Is there any way to do this in PHP (or with a combination of JS)?

    Quote Originally Posted by yangyang View Post
    There's a login form on page A: 404 Not Found

    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 <iframe></iframe> 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 <iframe></iframe>? So after the person logs in from A.html, he arrives at C.html with the actual CP dashboard framed in an <iframe>.

    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?
    Your question is extremely difficult to understand. Where is your .php file that processes the login? If B.php processes the login, then it could simple immediately redirect to the C.html page. If this is what you are trying to achieve, let me know and I can try help you out a little with the coding.

  3. #3
    Super Moderator tsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to beholdtsdesigns is a splendid one to behold tsdesigns's Avatar
    Join Date
    February 6, 2008
    Location
    Scotland
    Posts
    1,078
    Rep Power
    6
    Feedback Score
    0

    Default Re: Is there any way to do this in PHP (or with a combination of JS)?

    What i'd do is use a separate php file (lets call it D) which the form from A would submit to.
    At the end of D I would use header to redirect to page C (which has page B framed into it).

    But you'd need to remove the login info from B and put it into a new file, add the redirect to the end of that and then change the login form to pass the info into D instead.

  4. #4
    I'm New! webopius is on a distinguished road
    Join Date
    July 5, 2009
    Location
    London
    Posts
    19
    Rep Power
    3
    Feedback Score
    0

    Default Re: Is there any way to do this in PHP (or with a combination of JS)?

    Your question took me a few minutes to get my head around!

    I'd probably use PHP session variables and store the result from A in one or more session vars before redirecting to C (which frames B).

    B could then read the session data and retrieve the data that was submitted in the login form, A.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads