-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·56 lines (54 loc) · 2.34 KB
/
index.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
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* This is defaut page to display records
* Created: Nov 9,2017
* Author: Muhammad Ayaz
* Email: mailtomayaz@gmail.com
*/
?>
<html>
<?php include 'header.php'; ?>
<body>
<div class="container">
<h3 class="">Simple Crud Operation in PHP mysql</h3>
<div class="row>">
<a type='button' class=" btn btn-primary" href="add.php">Add User</a>
</div>
<div class="row">
<div class="showdata">
<table class="table table-bordered">
<thead class="thead-inverse">
<tr>
<th>No.</th>
<th>Name</th>
<th>Email</th>
<!-- <th>location</th>-->
<th>phone</th>
<th>Resume</th>
<th>Action</th>
</tr>
</thead>
<?php
$data = getRecords($con);
while ($row = mysqli_fetch_array($data)) {
echo "<tr>";
echo " <td>" . $row{'id'} . "</td>";
echo " <td>" . $row{'name'} . "</td>";
echo " <td>" . $row{'email'} . "</td>";
// echo " <td>".$row{'location'}."</td>";
echo " <td>" . $row{'phone'} . "</td>";
echo " <td><a href=uploads/" . $row{'resume'} . ">" . $row{'resume'} . "</a> </td>";
echo " <td><a class='btn btn-primary' href=submithandler.php?view=" . $row{'id'} . ">view</a> || <a class='btn btn-primary' href=submithandler.php?edit=" . $row{'id'} . ">Edit</a> || <a class='btn btn-primary' href=submithandler.php?delete=" . $row{'id'} . ">delete</a></td>";
echo "</tr>";
}
?>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>