Hey guys--
This is my first post. First time asking help, so bear with me.
I'm trying to transfer information over a page.
here's some of the code.
$time = time();
$user_data = mysql_fetch_array(mysql_query("SELECT id, username, password FROM member WHERE username='$_POST[user]' AND password='$_POST[pass]'"));
if($_POST[user] && $_POST[pass] && $_POST[sub]){
if($user_data[id] > 0){
setcookie ("user", md5($user_data[username]), $time+3200);
setcookie ("pass", md5($user_data[password]), $time+3200);
header('location:secure.php');
}
Now when it hits the:
header('location:secure.php');
It's supposed to reload the page, but with using MySQL I'm not sure how I would keep the $user_data array variables so that they could compare in this:
elseif($_COOKIE[user] == md5($user_data[username]) && $_COOKIE[pass] == md5($user_data[password]))
Hopefully I was clear enough and someone can help me.
Again, I'm trying to refresh with header so that the cookies will refresh and then I need to compare the cookie information to the user_data array.