Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    95
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Submitting a form in an iframe?

    I know there are lots of topics on this subject, I just can't get my code to work. I am using php/mysql. On my website I have a member area where you can login. Once logged in I have a link to a control panel on a 3rd party website that loads into an iframe. The first page to load into the iframe is a login page. But once the member is logged in to my site, the username and password for the other site is known so I would like to submit the login form so the control panel loads up straight away. But I have no idea how to submit the form on the site loaded into the iframe.

    The code of the form loaded into the iframe is
    PHP Code:
    <form name="form1" method="POST" action="/cp/index.php?do="
            <
    table border="0" align="center" cellpadding="8" background="images/bg_ltgrey.gif">
              <
    tr
                <
    td colspan="2"><center><h2 class="title">Login</h2></center
              </
    tr
                         <
    tr
                <
    td align="right" valign="middle" >Phone Number</td
                <
    td><input name="username" type="text" id="username"></td
              </
    tr
              <
    tr
                <
    td align="right" valign="middle">Password</td
                <
    td><input name="password" type="password" id="password"></td
              </
    tr
              <
    tr
                <
    td colspan="2"></td
              </
    tr
              <
    tr valign="bottom"
                <
    td colspan="2"><div align="center"
                    <
    input type="image" src="images/loginbutton.gif" name="Submit" alt="Login"
                  </
    div></td
              </
    tr
              <
    tr
                <
    td colspan="2">&nbsp;</td
              </
    tr
              <
    tr
                <
    td colspan="2"><div align="center"><a href="/cp/index.php?do=lostPassword">Forgotten your password?</a></div></td
              </
    tr
            </
    table
          </
    form
    Can anyone give me a hint how I would pass on "username", "password" and submit the page when the iframe is first loaded?
    Last edited by Taipan; 01-09-2007 at 11:38 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •