Welcome to Geeklog, Anonymous Thursday, September 19 2024 @ 01:12 pm EDT

Geeklog Forums

Login on Static Page Problem


Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
I put my Login/Password on a static page. But when I put in a username/password, it stays on that page and I need it to jump back to the index page as a logged in user. I simply have this on a static page called login. Anyone know the answer? Thank you.

<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td>
<div class="blocktext">
<form action="http://www.mysite.com/users.php" method="POST">
<b>Username:</b>
<b>Password:</b><br>
<input type="text" size="6" name="loginname" value="" style="border: 1px #666666 solid; font-size: .7em">
<input type="password" size="6" name="passwd" style="border: 1px #666666 solid; font-size: .7em"> 
<input type="submit" value="Login">
</form>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
user.php tries to return the user to the page s/he came from which, most of the time, is what you'd expect.

You would need some PHP code that detects if the user is logged in or not and then either displays the login form or redirects them to the index page.

bye, Dirk
 Quote

All times are EDT. The time is now 01:12 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content