-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfetch.php
54 lines (45 loc) · 1.79 KB
/
fetch.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
//fetch.php
$connect = mysqli_connect("localhost", "root", "", "hrm");
if(isset($_POST["employee_id"]))
{
$query = "SELECT * FROM emp_details WHERE emp_id = "."'".$_POST['employee_id']."'";
$result = mysqli_query($connect, $query);
$row = mysqli_fetch_array($result);
$fname = $row['fname'];
$lname = $row['lname'];
$marital_status=$row['marital_status'];
$nationality = $row['nationality'];
$birth_date = $row['birth_date'];
$gender = $row['gender'];
$Address = $row['Address'];
$num_child= $row['num_child'];
$num_relative = $row['num_relative'];
$num_family_members = $row['num_family_members'];
$contact_per_name = $row['contact_per_name'];
$econtact_no = $row['econtact_no'];
$title_name = $row['title_name'];
$role_name = $row['role_name'];
$pg_type = $row['pg_type'];
$status_type = $row['status_type'];
$joined_date = $row['joined_date'];
$data['fname'] = $fname;
$data['lname'] = $lname;
$data['marital_status'] = $marital_status;
$data['nationality'] = $nationality;
$data['birth_date'] = $birth_date;
$data['gender'] = $gender;
$data['Address'] = $Address;
$data['num_child'] = $num_child;
$data['num_relative'] = $num_relative;
$data['num_family_members'] = $num_family_members;
$data['contact_per_name'] = $contact_per_name;
$data['econtact_no'] = $econtact_no;
$data['title_name'] = $title_name;
$data['role_name'] = $role_name;
$data['pg_type'] = $pg_type;
$data['status_type'] = $status_type;
$data['joined_date'] = $joined_date;
echo json_encode($data);
}
?>