-1
Я логин и выбрать не помню эта ошибка возникаетКак исправить «Примечание: Undefined индекс»
Примечание: Undefined индекс: isRemember в веб/контроллеры/cont.userForm.php на линии 16
Код cont.userForm.php
if(isset($_POST) && $_GET['action'] == 'login' && $_GET['token'] == $_SESSION['token']){
if($huy->isExist(APP_TABLES_PREFIX . 'user','id',array('email'=>$_POST['email'],'password'=>sha1($_POST['password'])))){
$thisUser = $db->Query(APP_TABLES_PREFIX . 'user','role',array('email'=>$_POST['email'],'password'=>sha1($_POST['password'])));
if($thisUser['0']['role'] == 0){
$user->alert('danger',$l['email_not_confirmed']);
}else{
if ($_POST['isRemember'] == 0){
$user = $db->Query(APP_TABLES_PREFIX . 'user','*',array('email'=>$_POST['email'],'password'=>sha1($_POST['password'])));
$db->Update(APP_TABLES_PREFIX . 'user',array('email'=>$_POST['email']),array('last_login'=>$now));
$_SESSION['userId'] = $user['0']['id'];
echo '...';
}else{
$user = $db->Query(APP_TABLES_PREFIX . 'user','*',array('email'=>$_POST['email'],'password'=>sha1($_POST['password'])));
$db->Update(APP_TABLES_PREFIX . 'user',array('email'=>$_POST['email']),array('last_login'=>$now));
$_SESSION['userId'] = $user['0']['id'];
setcookie("userId", $user['0']['id'], time() + (10 * 365 * 24 * 60 * 60), '/', NULL, 0);
setcookie("hash", md5($user['0']['id'].$user['0']['password']), time() + (10 * 365 * 24 * 60 * 60), '/', NULL, 0);
echo '...';
}
}
}else{
$user-> alert('danger',$l['login_incorrect']);
}
}
Флажки не отправляются, если не отмечены. – JimL