Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1060687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:21:52+00:00 2026-05-16T18:21:52+00:00

I my login form if I dont check remember me check box in php

  • 0

I my login form if I dont check remember me check box in php script it gives <b>Notice</b>: Undefined index: autologin in error. in my .php file I have
$check_autologin = $_POST['autologin']; And I am checking is user checked it

if($check_autologin == 1)
    {
   $password_hash = $encrypted_mypassword;     
   setcookie ($cookie_name, 'usr='.$username.'&hash='.$password_hash, time() + $cookie_time);
   }

and this is my check box field <input type="checkbox" name="autologin" value="1">Remember Me<br />

How could check box can return any default value if it is not checked?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:21:53+00:00Added an answer on May 16, 2026 at 6:21 pm

    I suspect the problem is when your checkbox is not checked the value doesn’t exist in the $_POST array.

    Try insulating your value check by using

    isset( $_POST['autologin'] )
    

    thusly:

    $check_autologin = false;
    if( isset( $_POST['autologin'] ) ) {
        $check_autologin = $_POST['autologin'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am modifying a php login form, adding javascript check form function to it.
I have a login form that contains a username textbox and a password box.
Login Form: $authAdapter = Zend_Registry::get('authAdapter'); $authAdapter ->setIdentity($formData['email']) ->setCredential($password) ->setCredential(1); Bootstrap: protected function _initAuth(){ $this->bootstrap('db');
I have a login form which appears at the top of all of my
I have a usual login form consisting of two input fields, one for login,
I create a login form to bind to the ldap server, if successful, it
I have a login form for my website. This login form have two text
I have a login form that has Username and password as inputs from user
I'm trying to post to the login form of an application on another subdomain
I'm playing around with the physics login form from Doug Mccune's blog I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.