-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread.php
81 lines (76 loc) · 3.99 KB
/
read.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
// session_start();
include('includes/header.php');
include('includes/dbconnect.php');
?>
<section>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-6">
<?php
include('includes/message.php');
?>
<div class="card">
<div class="card-header">
<h4 class="d-inline-flex flex-row">ID : <?php if (isset($_GET['id'])) {
$employee_id = $_GET['id'];
$query = "SELECT * FROM employee WHERE id='$employee_id' ";
$result = mysqli_query($conn, $query); echo $employee_id;?>
<h4 class="float-end">Details</h4>
</h4>
</div>
<div class="card-body">
<?php
if (mysqli_num_rows($result) > 0)
{
$employee = mysqli_fetch_array($result);
// print_r($employee);
?>
<form action="code.php" method="POST" enctype="multipart/form-data">
<div class="mb-3 form-group">
<label for="exampleInputEmail1" class="form-label">Employee Name</label>
<p class="form-control">
<?php echo $employee['name']; ?>
</p>
</div>
<div class="mb-3 form-group">
<label for="" class="form-label">Contact</label>
<p class="form-control">
<?php echo $employee['phone']; ?>
</p>
</div>
<div class="mb-3 form-group">
<label for="exampleInputEmail1" class="form-label">Email address</label>
<p class="form-control">
<?php echo $employee['email']; ?>
</p>
</div>
<div class="mb-3 form-group">
<label for="exampleInputEmail1" class="form-label">Department</label>
<p class="form-control">
<?php echo $employee['department']; ?>
</p>
</div>
<!-- <div class="mb-3 form-group">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" name="password" id="password">
</div> -->
<div class="mb-3 form-group">
<label for="" class="form-label">Image</label>
<p class="">
<img src="<?php echo "uploads/".$employee['image']; ?>" alt="oldimage" width="100" height="auto">
</p>
</div>
</form>
<?php
} else {
echo "NO such id found";
}
}
?>
</div>
</div>
</div>
</div>
</div>
</section>