$result = $obj->get_info($data); while ($row = mysqli_fetch_array($result)) { $data = array($row['m_card'], $row['m_name'], $row['father_name'], $row['cell_number'], $row['concile_id'], $row['area_id'], $row['address']); } if (is_null($data)) { $result = array('Not Avail able'); echo json_encode($result); } else { echo json_encode($data); } exit; } if (isset($_POST['card'])) { $obj = new inject_record(); $param = array("card" => $_POST['card'], "card_column" => $_POST['column']); $result = $obj->get_info($param); //echo $result; //exit; if (mysqli_num_rows($result) == 1) { //echo '<span>this card no already register'.$_POST['card'].'<span>'; echo 0; } else { echo 1; } exit; } class inject_record { function db_connection() { $conn = new connection();
$obj = new inject_record(); $result = $obj->get_area($_POST['id']); while ($row = mysqli_fetch_array($result)) { $data[] = array($row['number'], $row['name'], $row['hw_name']); } if (is_null($data)) { $result = array('a'); echo json_encode($result); } else { echo json_encode($data); } exit; } if (isset($_POST['mcard'])) { $obj = new inject_record(); $result = $obj->get_info($_POST['mcard']); while ($row = mysqli_fetch_array($result)) { $data = array($row['m_card'], $row['m_name'], $row['father_name'], $row['cell_number'], $row['concile_id'], $row['area_id'], $row['address']); } if (is_null($data)) { $result = array('Not Avail able'); echo json_encode($result); } else { echo json_encode($data); } exit; } class inject_record { function db_connection() {
} $parm = array($_POST['card_number'], $index, $date, $card_column); $obj = new inject_record(); $result = $obj->update_injection($parm); break; //}else{ //echo '<br>epmty'; } $i++; } } //exit(); if (isset($result) && $result == TRUE) { $data = array("card" => $_POST['card_number'], "card_column" => $card_column); $obj = new inject_record(); $result = $obj->get_info($data); $row = mysqli_fetch_array($result); $dob = date_create($row['dob']); $curren_date = date_create(date('Y-m-d')); $diff = date_diff($dob, $curren_date); //echo $diff->format("%R%a days"); $days = $diff->format("%a"); } else { $error = 'Try Again'; } } ?> <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates