DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   Remember ME option (http://www.daniweb.com/forums/thread57870.html)

mahe4us Oct 12th, 2006 3:06 pm
Remember ME option
 
Hi to everyone,

I have been trying to activate "remember me" option in login page of my site. But I have some errors while executing this option. Can anyone help me to solve the problem or any correct URL for activating cookies.

Thanks to all..
Bye..

tgreer Oct 12th, 2006 7:49 pm
Re: Remember ME option
 
Whether or not to save/store cookies is a user option. If a user decides to clear their cookies, there is nothing you can do about it.

mahe4us Oct 12th, 2006 11:19 pm
Re: Remember ME option
 
Hai tgreer,

Thanks yo your nice reply. If the user didnt check the Remember me option it does nothing. But if the user wants Remember me option then we would save the username and password in cookie. For that I need some help. Anyone give URL for cookie set.

bye..

tgreer Oct 12th, 2006 11:54 pm
Re: Remember ME option
 
Creating cookies is simple. Use the System.Web.HttpCookie class.

HttpCookie newCookie = new HttpCookie("myCookie");
newCookie.Values.Add("Key","Value");
newCookie.Expires = #12/31/2008#;
Response.Cookies.Add(newCookie);
That's untested code.

MCP Oct 14th, 2006 8:23 pm
Re: Remember ME option
 
...or in php use setcookie (http://ca3.php.net/manual/en/function.setcookie.php)

I'm assuming you're looking for the PHP code =)

tgreer Oct 15th, 2006 12:07 pm
Re: Remember ME option
 
Whoops! For some reason I thought we were in the ASP.NET forum. Sorry, and thanks for the correction.

mahe4us Oct 16th, 2006 9:20 pm
Re: Remember ME option
 
Hi tgreer,

Its not a problem. I found the way for set cookies for Remember me option in login page. Anyway thanku for your useful reply..

Bye.....


All times are GMT -4. The time now is 11:05 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC