Hey

Im very new to all this but i have managed to run a phpbb forum for quite some time.

Tho now i want to expand my site and create a separate login page.
I managed to create the login box and i am able to login from it.

Tho now i want to ad a few functions.

  1. When i go to my index.html and type in the login details into the box. I do not want to be sent to the forum. I want to stay on the index.html site.

  2. I have managed this with this line

    <input type="hidden" name="redirect" value="../index.html" />

    Tho when i click login a second time, im still being redirected to the forums index page.

  1. When i log in and type in the correct username/password i want the login field to disappear and show some info about the specific user that have logged in.

This is my full site code for the index page that i use.

<html>
<body>
<TITLE>Murethand - Invicta</TITLE>
<BODY style="MARGIN: 15px 10px;BACKGROUND: #222222" text=#000000>


<form action="./forum/ucp.php?mode=login" method="post">
    <h3><a href="./forum/ucp.php?mode=login">Login</a>&nbsp; &bull; &nbsp; <a href="./forum/ucp.php?mode=register">Register</a></h3>
    <fieldset>
        <label for="username">Username:</label>&nbsp;
        <input type="text" name="username" id="username" size="10" title="Username" />
        <label for="password">Password:</label>&nbsp;
        <input type="password" name="password" id="password" size="10" title="Password" />
        <input type="submit" name="login" value="Login" />
    </fieldset>
<label for="autologin">Log me on automatically each visit <input type="checkbox" name="autologin" id="autologin" /></label>
<input type="hidden" name="redirect" value="../index.html" />
</form>




</body>
</html>



I run a phpbb3 (latest) forum.

Any help would be welcome!

    You have to grab the user object/user session from phpbb in the first place before you put the login form in your page.

    If you check the user session and the user is already logged in you dont display it, and your problem in your first question will never appear because when you are redirected from "./forum/ucp.php?mode=login" the first time you detect that the user is logged in and you dont show the form.

    Edit:
    And of course

    show some info about the specific user that have logged in.

    instead.

      I dont know how to make a code like that.

      I have no coding experience

        Write a Reply...