Hi, can someone teach me how to use cookie? I have tried to setup a unique cookie, but it doesn't work. When i open a new browser, they will share the same cookie. Can someone guide me how to avoid this? I want something like what Yahoo mail do, i.e everytime i open a new browser it will link me to my index.php. Thanks in advance...
you can create a cookie in headers . with : set_cookie(name,value); http://php.net/manual/en/function.setcookie.php
Everytime you open a new browser. Meaning it is the same browser using the same cookie (same session). If you login in IE. Then open Firefox and login. It would require you to login again (different sessions). Cookies are unique per person per browser. Cookies will be shared amoung the same browser, because it is considered to be the same session. It is not impossible, but I would guess it would be hard to detect on the server site that the clients side browser opened a new browser window.
Thanks for the replies Exodus : After reading your reply that it's quite difficult to detect from server side whether client opens a new window or not. I decided to use a simple way to solve my problem I put some checking in my first script, if there is a cookie that has been set, i'll redirect user to index.php. Thanks again for your reply