Hi, I have a login system this is the code


 * User has already logged in, so display relavent links, including
 * a link to the admin center if the user is an administrator.
   echo "<h1>Logged In</h1>";
   echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
       ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] &nbsp;&nbsp;"
       ."[<a href=\"useredit.php\">Edit Account</a>] &nbsp;&nbsp;";
      echo "[<a href=\"admin/index.php\">Admin Center</a>] &nbsp;&nbsp;";
   echo "[<a href=\"process.php\">Logout</a>]";
echo "<br><br>";

 * User not logged in, display the login form.
 * If user has already tried to login, but errors were
 * found, display the total number of errors.
 * If errors occurred, they will be displayed.
if($form->num_errors > 0){
   echo $form->num_errors." error(s) found";
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"></td><td><?php echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"></td><td><?php echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <?php if($form->value("remember") != ""){ echo "checked"; } ?>>
Remember me &nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>
<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>



And I want it like this. This login does not have any .css and I want it to be like this...

Login: |_____________________| Password: |_________________________| Register|Forgot Password.

Please can someone help Fast.

Recommended Answers

All 5 Replies

Just remove the TALBEs, TRs an TDs .
You don't need a table to do that.

I'm sorry if i didn't understood the question well.

Member Avatar

SO what's the problem? Doesn't it display the way you show it above?

You want CSS help or help with the PHP? You've posted to the PHP forum, so I'm assuming it's to do with the php code. Could you give an idea of the problem?

Sorry, I had thought it was css. Because I am used to posting in php. Really Sorry please could you move it to css. and yes it might be css because I want the login forms and links to be like on 1 line instead of quite a few. like Login: ................. password:................... forgot pass|register. Like that instead of a big chunk.

Now please can someone help


Try this (simplified manner) :

<form action="process.php" method="POST">
    Username:<input type="text" name="user" maxlength="30" value="" />Password:<input type="password" name="pass" maxlength="30" value=""/>Register | Forgot password
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.