Results 1 to 8 of 8

Thread: Form

  1. #1
    Join Date
    Jul 2004
    Location
    Ottawa, Canada
    Posts
    1,363
    Tokens
    106
    Habbo
    Yonder

    Latest Awards:

    Default Form

    I have a login page and im trying to put a login form on the index page. It was working i dont know what happened.

    Any ideas much appreciated:

    Index.php
    http://pastebin.com/m83a22d4

    Snipped of login box on index.php
    HTML Code:
    <form action="login.php" method="post">
                           <table width="217" height="205" border="0"  align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td class="ttl"><b>Login Here!</b></td>
                    </tr>
                    <tr>
                      <td style="padding-bottom: 10px;"><br>
    					Username:<br>
    					<input name="username2" size="25" maxlength="20" class="login1" type="text"></td>
                    </tr>
                    <tr>
                      <td style="padding-bottom: 10px;">Password:<br>
    					<input name="password2" size="25" maxlength="20" class="login1" type="password"></td>
                    </tr>
                    <tr>
                      <td><input name="login2" class="login2" value="Login" type="submit"></td>
                    </tr>
                    <tr>
                      <td><a href="lostpass.php">Forgot Password?</a> | <a href="signup.php">Sign Up!</a></td>
                    </tr>
                  </table>
              
      </form>

    Login.php

    http://pastebin.com/m75d6fd96

  2. #2

    Default

    What exactly doesn't work?

  3. #3
    Join Date
    Jul 2004
    Location
    Ottawa, Canada
    Posts
    1,363
    Tokens
    106
    Habbo
    Yonder

    Latest Awards:

    Default

    The login works fine on login.php

    But i try to login from index.php an doesnt work forwards me to login.php where i have to enter my login info again then it works.

    Im trying to make it so i login straight from index.php

  4. #4
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default

    Im guessing there is a reason for this, but why don't you just paste the code from login.php into where you want the form to appear on index.php?

  5. #5
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    Or just include the login.php file on the index.php?

    Code:
    <?php 
    include ( 'login.php' ); 
    ?>
    Place that wherever you want the login to appear?

  6. #6
    Join Date
    Jan 2009
    Posts
    159
    Tokens
    0

    Default

    If the file is called index.php, you must change the red bit

    Code:
    <form action="login.php" method="post">
    to index.php

  7. #7
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    853
    Tokens
    0

    Default

    Are you using an iframe to the login page (sorry if any of this sounds stupid, havent had enough time to check the whole coding job) ? You could try that if your not, could work. +rep also to anyone who can fix it.
    Cheap Layout Coding
    PM For Free Quote

  8. #8
    Join Date
    Jul 2004
    Location
    Ottawa, Canada
    Posts
    1,363
    Tokens
    106
    Habbo
    Yonder

    Latest Awards:

    Default

    Nevermind fixed it Lol silyl me do you not jsut hate things when they are right in your face.

    Just so anyone who wonders or whatever, i had the input boxes different on the index and login pages.

Posting Permissions

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