thats on the lines of what I was thinkning. Basicalley my code currently states:
I have been working on the cookie isea that thorpe brought up.
Have sone issues with it though.
basically it still uses sessions at login but if user doesn't login I a have a random number be assigned to the session. it works for that session but if the user vut if the user login he hase no way of being connect to the number his session is hie id then. I was trying to write a cookie to same that random number to compare to. but having some issues. here is what I got:
session_start();
if($_SESSION['userid'] == ""){
if (isset ($_COOKIE['cid']))
{
Show nonlogged in info
}else{
function randomPass() {
srand(microtime() * 1000000000000);
$pass_rnd = array_merge(range('a','z'), range('A','Z'), range(0,9));
$rnd = array_rand($pass_rnd, 8);
$password = "";
for($i=0;$i<=7;$i++){
$password .= $pass_rnd[$rnd[$i]];
}
return $password;
}
$id = randomPass();
$_POST['id'];
setcookie('cid', '$id');
}
}else{
Show userid info
}
What do I think I feel like my cookie writting is flawed but its my first crack
I would rather not use cookies but, I cant seem to find any user specific informaton to link them to