Jump to content

Staying logged-in with cookies?


RDKL PerFecT

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

LOGINForm
[code]
<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!>
[/code]

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.
Link to comment
https://forums.phpfreaks.com/topic/5952-staying-logged-in-with-cookies/
Share on other sites

Archived

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

×
×
  • Create New...

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.