Hi I need to create user authetication pages, but my problem is that lots of user using same machines. Cookies are stored on the client user's hard drive, so the information remains even the browser is closed and reopen. How can I delete cookies? or I have to use randomizing? can anybody give me little example about cookie authorizing.
thanx.
Hello, set lifetime to zero.
I suggest you read this article about auth. http://www.phpbuilder.org/columns/tim20000505.php3
Ok using in login page index.php
setcookie('User',$user,(time()+0));
how I can get cookie value in page user.php Like echo "$user";
????
how I can get cookie value in page user.php
Cookie\'s variables are global one, so just type
echo $variable or echo $HTTP_COOKIE_VARS[variable]
But Is my php conf so buggy or what but I can't get any global variables. I'll trier all kinds of stuff but it still not working. can anybody give me simple example???
There is a switch in the config file that must be set, track_vars, which should be 1 or On. then the cookies, query string, and http post data are stored in $HTTP_COOKIE_VARS, $HTTP_GET_VARS, and $HTTP_POST_VARS.