Results 1 to 2 of 2

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

  1. #1
    yangyang's Avatar
    yangyang is offline Sky Marshal
    Join Date
    Dec 2008
    Location
    kavoir.com
    Posts
    69
    Blog Entries
    4
    Thanks
    1
    Thanked 3 Times in 3 Posts

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

    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 <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?
    I'm an entrepreneur at Kavoir LLC. My latest venture is about useful data sets.

  2. #2
    Aussie's Avatar
    Aussie is offline Unknown Net Builder
    Join Date
    Oct 2009
    Posts
    138
    Thanks
    11
    Thanked 46 Times in 36 Posts
    I don't get why you would even need a B.html to store the information and then insert into C.html with a iframe.

    First up you can parse PHP in a html page with a little code in your htaccess file

    Code:
    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .htm .html
    then all you need to do is create a user database that once the log in it redirects them to c.html and you do this.
    Code:
    <?php
    include "userinfo.php";
    ?>
    Where you need the users info to be inserted into the page.

    This LINK will explain how to create the user database and login script.


    Then you need to create the userinfo.php and pull the info you want from the database.

    Tiz simple.. ... really..

    Aus

Similar Threads

  1. Replies: 6
    Last Post: 6 July, 2009, 00:16 AM

Tags for this Thread

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
  •