Results 1 to 2 of 2

Thread: Opening a page while passing username and password

  1. #1
    Join Date
    Mar 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Opening a page while passing username and password

    Okay,

    I'm trying to integrate phpbb into my site.

    I created a page with an iframe to load phpbb, this page is located at http://www.domain.com/index.php?page=forum

    On my main page, I have a link that looks like this:

    Code:
                                        <form name='frmForum' id='frmForum' action="forum/login.php" method='post' target="_blank">
                                        <input type="hidden" name='login' value="Log in" />
                                        <input type="hidden" name='username' value="{$smarty.session.UserName}" />
                                        <input type="hidden" name='whatIneed' value="{$smarty.session.whatIneed}" />
                                        </form>
                                        <a href="#" class="panellink" onclick="javascript:document.frmForum.submit(); return(false);" >FORUM</a>
    The above code correctly opens phpbb in another browser window and logs me in, but does not open the page with the iframe.

    I've tried this without luck:

    Code:
    <form name='frmForum' id='frmForum' action="forum/login.php" method='post' target="_self">
                                        <input type="hidden" name='login' value="Log in" />
                                        <input type="hidden" name='username' value="{$smarty.session.UserName}" />
                                        <input type="hidden" name='whatIneed' value="{$smarty.session.whatIneed}" />
                                        </form>
                                        <a href="http://www.domain.com/index.php?page=forum" class="panellink" onclick="javascript:document.frmForum.submit(); return(false);" >FORUM</a>
    Any suggestions are welcome.

    Thanks.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    the target needs to be the ID of your frame.

    if you have named your frame "booger" you would say <blah blah ... target="booger">

    and yes, I like saying booger.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •