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

Hi,

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">                      
    <label>Username:</label> 
    <input class="field" maxlength="50" name="username" value="" type="text" id="form_username" />                       
    <label>Password:</label> 
    <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" /> 
</form>

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.

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!

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

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

Yep! Glad I found Daniweb 2 months ago.

Be a part of the DaniWeb community

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