Jump to content

cookies problem


delickate

Recommended Posts

Hi,

I've a small form, having two fields username and password. and a checkbox remember. i want to auto fill username and password field if i login by enable checkbox remember. i put following code to do that:

                    if(isset($loginform['txtrememberme']))

    {

setcookie('txtusername', mysql_real_escape_string($loginform['txtusername']), time()+60*60*72, '/', '', 0);

setcookie('txtpassword', mysql_real_escape_string($loginform['txtpassword']), time()+60*60*72, '/', '', 0);

  }

after login, when i logout and come back to login page, it didn't save the values.

can anyone help please?

Link to comment
https://forums.phpfreaks.com/topic/252746-cookies-problem/
Share on other sites

Hi,

Thanks for reply. I downloaded the script from this website http://www.bitrepository.com/php-autologin.html

as i told, i don't want to fill login form for next. when i open the login page, it should auto fill the form. that is what i want to achieve

please guide what is the best technique

Thanks

Link to comment
https://forums.phpfreaks.com/topic/252746-cookies-problem/#findComment-1295752
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.