session_start(); include 'dbConnect.php'; if($con) { //echo "connection done"; } else { //echo "connection error"; } $ERROR_TEXT=""; $VI=$_POST['vi']; $VI=urldecode($VI); $VI=urldecode($VI); $_POST=json_decode($VI,true); // arary if(isset($_POST["login"])) { $userName = $_POST["userName"]; $password = $_POST["password"]; $jrd_captcha = $_POST["jrd_captcha"]; $userName =mysqli_real_escape_string($con,$userName); $password =mysqli_real_escape_string($con,$password); $jrd_captcha =mysqli_real_escape_string($con,$jrd_captcha); if($_SESSION['digit']==$jrd_captcha) { //Slno activityId activityName priority dateInit area taskCo remarks status lastUpdated deadline category //echo $area." ".$category." ".$activity." ". $taskcoordinator." ".$officerresponsible." ".$dateInit." ".$ststus; $sql1 = "select * from userMaster where userName = '$userName' and password = '$password'"; $query1 = mysqli_query($con,$sql1 ) or mysqli_error(); $rowCount = mysqli_num_rows($query1); if($rowCount==1) { $_SESSION["userName"] = $userName; $_SESSION["password"] = $password; header("location:activityMain.php"); } else {$ERROR_TEXT="Invalid Login"; } //echo $sql2; } else $ERROR_TEXT="Invalid Captcha"; } ?>