Hiyas
I use 2 cookies to store a username and another to store a password, everytime a user joins a page in the members area I include a page with the below code, I thought everything was working well until I removed the date on the cookie but the people canstill access the page!
<?php
if(!isset($_COOKIE['test1'])) header("Location: login.php");
if(isset($_COOKIE['test1'])) {
include("dbconnect.php");
$sql = "SELECT ID FROM " . user . " WHERE username='" . addslashes($test1) . "' AND password='" . md5($test2) . "' LIMIT 1";
if(!($result = mysql_query($sql))) die(mysql_error());
if(mysql_num_rows($result) == 1) {
}
}
First it checks that the cookie is there then it checks the information on each cookie is correct but it does nt seem to wrok 🙁
Any ideas?