1.can i set cookies in a php function.
2.actually i am creating a user authentication in php,My need is when an user alreday logged in no one can logged in with same user name and password.
i allready make it when user do all activity properly like sign in and sign out, by useing a flag in database but i just confused on one point when user login and unfortunality or by mistake user close the browser direct or due to any reason system will reboot , then what happend flag not set properly because user not reset the flag and he will not able to login again.
Pls help me.
if u people have any idea pls share with me.
thanks in advance
Dhirendra