Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.