0){ $_SESSION['yd_uname'] = $dusername; $_SESSION['yd_id'] = $row['userid']; $_SESSION['yd_type'] = $row['usertype']; if($row['active']==0){ $narration = ' successfully activated '; //UPDATE ACTIVITY TABLE $sqlac = "INSERT INTO activity_log_user (user_id, narration, actions, addedon1, addedon) VALUES ('".$row['userid']."', '".$narration."', 'active', '".date('Y-m-d')."', '".date('Y-m-d h:i:s')."')"; q($sqlac); } $sqlActive = "UPDATE user_details SET loginstatus = 1, active = 1 WHERE username = '".$_POST['username']."'"; $resActive = q($sqlActive); header('Location:dashboard.html'); }else{ $msg='Invalid Log in Details! Please Try Again.'; } } ?>