*Note: I edited the title to ("Remember me" checkbox for HTML Forms) but it did not change.


I'm trying to implement a Remember me feature for this form below. I'm using my demo website to login to another website. I did a couple of searches here on Dani's and in google but all I found was for php logins.

I understand that it deals with browser cookies and stuff. So, I hope someone could point me out to a simple tutorial.

<form action="http://someOtherwebsite.com/security/login" accept-charset="utf-8" method="post">                      
    <input class="field" maxlength="50" name="username" value="" type="text" id="form_username" />                       
    <input class="field" maxlength="50" name="password" value="" type="password" id="form_password" />                       
    <label><input id="rememberme" name="rememberme" value="remember" type="checkbox" /> &nbsp;Remember me</label>                      
    <input type="submit" name="submit" value="Login" class="bt_login" /> 
Re: "Remember me" checkbox for HTML Forms 80 80

Dear Sobias, the remember me check box is to create a cookie in the browser so the user stay logged in until he/she kill the cookie by logging out or if the cookie expires in x Days.
To do this from your website to login to another website:
- You have to check if the other website allows one to sign in from another website (example: facebook will not allow you)
- If it allows you, I suggest you to 'view-source' for the login page of the other website and save the form as it is. Of course you may change the style but make sure that if the form uses javascript, copy them as well.

I'm not sure if you want the php code for how to create a cookie since this topic is in the web design section, anyway I'am wondering why you want to let someone login to another website from your website ... If it's for testing it will be fine else, I recommend you to get a permission, because no one can trust logging to a website from another.

Re: "Remember me" checkbox for HTML Forms 80 80

Thanks for your reply.
Our class is doing a test project so we use this login for some purposes.
Anyway, my concern is the "Remember me" feature not how to implement a login for another website. I have checked many websites which have the "Remember Me" check box , but I couldn't find what's the code to implement this feature. If its a php code then of course I cant see it.
From your response , I can understand that this feature will need PHP to implement it correct ?
If so, I'll go ahead to the web dev section and ask.

Thanks again!

Re: "Remember me" checkbox for HTML Forms 80 80

yes sure ... html cant do this :) you can try php
good luck

Re: "Remember me" checkbox for HTML Forms 80 80

Cmps, I appreciate your help.
I'm really glad that I didn't follow my and your suggestion :) I found a simpler approach using Java Cookies*. PHP wouldn't be so great idea for a simple task like mine.

Thanks again man!
*Link: http://www.google.com/url?sa=t&source=web&cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fwww.w3schools.com%2Fjs%2Fjs_cookies.asp&ei=WZ4PUey8JOGQ0AXD1oGIDA&usg=AFQjCNFlmltWi2Y2BRV8kwTw2orRW5vp2A&sig2=_ap2EJfspq9mpW4BdIQUcw

Re: "Remember me" checkbox for HTML Forms 80 80

I hope these comments were able to help you get this implemented onto your forums!

Re: "Remember me" checkbox for HTML Forms 80 80

Yep! Glad I found Daniweb 2 months ago.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.