-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchfrm.php
128 lines (99 loc) · 4.73 KB
/
searchfrm.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
include('connection.php');
include('header.php');
?>
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">CRUD Using PHP/MySQL</a>
</div>
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav side-nav">
<li class="active">
<a href="index.php"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</nav>
<div id="page-wrapper">
<div class="container-fluid">
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
PHP CRUD <small>Create, Read, Update and Delete</small>
</h1>
</div>
</div>
<!-- /.row -->
<?php
$query = 'SELECT * FROM people
WHERE
people_id ='.$_GET['id'];
$result = mysqli_query($db, $query) or die(mysqli_error($db));
while($row = mysqli_fetch_array($result))
{
$zz= $row['people_id'];
$i= $row['first_name'];
$a=$row['last_name'];
$b=$row['mid_name'];
$c=$row['address'];
$d=$row['contact'];
$e=$row['comment'];
}
$id = $_GET['id'];
?>
<div class="col-lg-12">
<h2>Detailed Records</h2>
<div class="col-lg-6">
<form role="form" method="post" action="index.php">
<div class="form-group">
<input class="form-control" placeholder="First Name" name="firstname" value="<?php echo $i; ?>">
</div>
<div class="form-group">
<input class="form-control" placeholder="Last Name" name="lastname" value="<?php echo $a; ?>">
</div>
<div class="form-group">
<input class="form-control" placeholder="Middle Name" name="Middlename" value="<?php echo $b; ?>">
</div>
<div class="form-group">
<input class="form-control" placeholder="Address" name="Address" value="<?php echo $c; ?>">
</div>
<div class="form-group">
<input class="form-control" placeholder="Contact" name="Contact" value="<?php echo $d; ?>">
</div>
<div class="form-group">
<label>Comment</label>
<textarea class="form-control" rows="3" name="comment"><?php echo $e; ?></textarea>
</div>
<button type="submit" class="btn btn-default">Return to main menu</button>
</form>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Morris Charts JavaScript -->
<script src="js/plugins/morris/raphael.min.js"></script>
<script src="js/plugins/morris/morris.min.js"></script>
<script src="js/plugins/morris/morris-data.js"></script>
</body>
</html>