Alright, I am using a downloaded script from Hotscripts which I've been editing to my heart's content for a while now.. But I am running into some difficulities..
For some weird reason I can not make a log-out script which works!
Here's the (relavent) code snippets from the script:
$md5str = MD5( TIME() );
$cookie_val = "$username-$encrypted_password-$md5str";
$setcookie( "php_prof_auth", $cookie_val, time()+EXPIRE);
I tried writing my own little log-out script with a bit of help from the PHP manual, but for some weird reason it does not want to work:
$cookie = $_COOKIE['php_prof_auth'];
if(@setcookie ("php_prof_auth", $cookie, time() - 14400)){
echo "It worked!";
} else {
echo "It didn't work!<BR><BR>";
echo "DEBUG:<BR>";
echo $cookie;
}
The echo of $cookie shows this:
"prof-pr7fXtm8GZqPo-d6b6b959352e39336d1c773084961ffa"
Does anybody have any ideas on this??
I got a deadline in 4 days and this is really starting to pee me off 😉