Can someone help me with a log in box?

I know html log in boxes aren't very secure, but I need help with a code. I need to be able to input my members' usernames and passwords, so please show me where to input those in the code and add a place to input them if there isn't one. Also, i need it to log in to a certain page. Please call that URL, in the code, "LOGGED IN PAGE". Thank you so much in advance! Here is the code in its current stage:

<font face="verdana,arial" size=-1>

<center><table cellpadding=2 cellspacing=0 border=0>

<tr><td bgcolor="black"><table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td bgcolor="black" align=center style="padding:2;padding-bottom:4"><b><font size=-1 color="white">Members' Login</font></th></tr>

<tr><td bgcolor="white" style="padding:5"><br>

<form method="post" action=" name=pform>

<input type="hidden" name="action" value="login">

<input type="hidden" name="user" value="deluxe">

<input type="hidden" name="hide" value="">


<tr><td><font face="verdana,arial" size=-1>Login:</td><td><input type="text" name="login"></td></tr>

<tr><td><font face="verdana,arial" size=-1>Password:</td><td><input type="password" name="password"></td></tr>

<tr><td><font face="verdana,arial" size=-1> </td><td><font face="verdana,arial" size=-1><input type="submit" value="Enter"></td></tr>

<tr><td colspan=2><font face="verdana,arial" size=-1> </td></tr>

<tr><td colspan=2><font face="verdana,arial" size=-1>Lost your username or password? Find it <a href="INSERT URL HERE">here</a>!</td></tr>

<tr><td colspan=2><font face="verdana,arial" size=-1>Not member yet? Click <a href="INSERT URL HERE">here</a> to register.</td></tr>




Thank you again!

1 Answer

  • 1 decade ago
    Favorite Answer

    This code is simply the interface for the login code. You need to add some server-side code for it to work.

    You need to start with a form (here it is, cleaned up a little, to understand it better):

    <form action="LOGIN CHECK PAGE" method="post">


    <label for="username">Login:</label>

    <input type="text" name="username" id="username" value="" />



    <label for="password">Password:</label>

    <input type="password" name="password" id="password" value="" />



    <input class="submit" type="submit" value="Enter" />


    <br class="clear" />

    <p>Lost your username or password? Find it <a href="FORGOT PASSWORD PAGE">here!</a></p>

    <p>Not member yet? Click <a href="REGISTRATION PAGE">here</a> to register.</p>


    This form requires a style sheet:

    <style type="text/css">



    border:solid black 1px;

    border-top:solid black 20px;



    font-family:verdana,arial, sans-serif;



    #loginbox p{






    #loginbox label{




    #loginbox input{




    #loginbox input.submit{









    Then, you need a server-side script for the "LOGIN CHECK PAGE" :


    $username = $_POST['username'];

    $password = $_POST['password'];

    // check user name and password in the database

    // See tutorial here:


    // If the username and password are in the database,

    // forward to the "LOGGED IN PAGE"

    header("Location: LOGGED IN PAGE");


Still have questions? Get your answers by asking now.