Jump to content


This topic is now archived and is closed to further replies.


Staying logged-in with cookies?

Recommended Posts

Yeah, I basically just want it so that when a user logs in, cookies keep them logged in. Here is my login form and checklogin.php

<form action="Login Page" method="post"><br />
          <input type="text" name="username" size="17">
          <input type="password" name="password" size="17">
          <input type=submit name=Submit value=Submit!>

Where Login is Checked
[code]// Convert password to md5 hash
$password = md5($password);

// check if the user info validates the db
$sql = mysql_query("SELECT * FROM Members WHERE username='$username' AND password='$password' AND Activation='1'");
$login_check = mysql_num_rows($sql);[/code]

If anyone can help with this I would be most greatful.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.