query($update_status); } } if(isset($_POST['userLogin'])) { $username = $mysqli -> real_escape_string($_POST['username']); $pass = $mysqli -> real_escape_string($_POST['pass']); $checkUser = 'SELECT * FROM `user` WHERE `userName` = "'.$username.'"'; $result = $mysqli->query($checkUser); if(!empty($result) && $result->num_rows > 0){ while($row = $result->fetch_assoc()){ $uID = $row['id']; $userPass = $row['userPass']; }if($userPass === $pass){ $_SESSION['isLogin'] = true; $_SESSION['uID'] = $uID; echo "done"; exit(); header("location: index.php"); }else{ header("location: login.php?message=Password Not Correct"); } } else{ header("location: login.php?message=User Not Found"); } exit(); } $sub_sql=""; $toDate=$fromDate=""; if(isset($_POST['searchByDate'])){ $from=$_POST['from']; $fromDate=$from; $fromArr=explode("/",$from); $from=$fromArr['2'].'-'.$fromArr['1'].'-'.$fromArr['0']; $to=$_POST['to']; $toDate=$to; $toArr=explode("/",$to); $to=$toArr['2'].'-'.$toArr['1'].'-'.$toArr['0']; $sub_sql= " where transactionDate >= '$from' && transactionDate <= '$to' "; } $sql = "select * from newtransaction $sub_sql order by id desc"; $result = $conn->query($sql); ?> Login V8
num_rows > 0){ while($row = $result->fetch_assoc()){ if($row['transaction']==1){ $transactionType = "Repairing"; } elseif($row['transaction']==2){ $transactionType = "Sale(New)"; }elseif($row['transaction']==3){ $transactionType = "Sale(Old)"; } if($row['status']==1){ $stat = 'Deliverd'; }else{ $stat = 'Panding'; } echo' '; } } ?>
Transaction Customer Name Mobile No. Mobile Name IMEI No. Charges Date Remarks Status Action
'.$transactionType.' '.$row['customerName'].' '.$row['customerMobile'].' '.$row['mobName'].' '.$row['IMEInumber'].' '.$row['totalCost'].' '.$row['transactionDate'].'
'.$stat.'