View Full Version : Login fourm help

06-26-2011, 10:17 AM
Ok heres the thing when I first made this website I created my own login system and it worked but I had a button on the homepage which would open up the login fourm in a IFRAME (my site is based on IFRAMES) But now I have moved the login fourm to my homepage it logs you in BUT when you are logged in the log in fourm is still on the homepage. So is there any way to make the fourm hide once a successfull login has happend, here is my login fourm code:

<div id="apDiv13">
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input name="user" type="text" value="<? echo $form->value("user"); ?>" size="18" maxlength="30"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input name="pass" type="password" value="<? echo $form->value("pass"); ?>" size="18" maxlength="30"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login">
<font size="2">[<a href="forgotpass.php">Forgot Password?</a>]<a href="register.php">Sign-Up!</a></font></td></tr>
<tr><td colspan="2" align="left"><br></td><td align="right"></td></tr>
<tr><td colspan="2" align="left">&nbsp;</td></tr>

Heres a link to my website: http://www.onlinehelp.freehostingcloud.com

06-26-2011, 01:40 PM
Wrap your form in an if statement and check if the user is logged in. If not show the form if they are don't show the form.

Code for form goes here.