-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwaste_code.txt
62 lines (57 loc) · 2.58 KB
/
waste_code.txt
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
<!-- BELOW CODE NOT IN USE -->
<!--
<?php
if(isset($_POST['search'])){
$str=mysqli_real_escape_string($link,$_POST['search_input']);
$sql="select * from customer where cname like'%$str%'";
$res=mysqli_query($link,$sql);
while($row=mysqli_fetch_array($res)){
$name=$row['cname'];
$coupan=$row['coupan'];
$delicate=$row['delicate'];
$heavy=$row['heavy'];
$kids=$row['kids'];
$other=$row['other'];
$service=$row['service'];
$staff=$row['staff'];
$phone=$row['phone'];
$address=$row['address'];
$cid=$row['cid'];
}
if(mysqli_num_rows($res)>0){
echo "<table class='table table-secondary'>
<tr>
<th scope='col'>Name</th>
<th scope='col'>Coupan ID</th>
<th scope='col'>Staff</th>
<th scope='col'>Heavy</th>
<th scope='col'>Delicate</th>
<th scope='col'>Kids</th>
<th scope='col'>Other</th>
<th scope='col'>Service</th>
<th scope='col'>Phone</th>
<th scope='col'>Address</th>
<th scope='col'></th>
<th scope='col'></th>
</tr>";
?><h4 style="text-align:center;margin-bottom:20px;">Recently searched customer's data listed below:</h4> <?php
echo "<tr>";
echo "<td>"; echo $name;echo "</td>";
echo "<td>"; echo $coupan;echo "</td>";
echo "<td>"; echo $staff;echo "</td>";
echo "<td>"; echo $delicate;echo "</td>";
echo "<td>"; echo $heavy;echo "</td>";
echo "<td>"; echo $kids;echo "</td>";
echo "<td>"; echo $other;echo "</td>";
echo "<td>"; echo $service;echo "</td>";
echo "<td>"; echo $phone;echo "</td>";
echo "<td>"; echo $address;echo "</td>";
echo "<td>"; ?><a href="edit.php?id=<?php echo $cid; ?>"> <button type="text/javascript" class='btn btn-primary'>Edit</button><?php echo "</td>" ;
echo "<td>"; ?><a href="delete.php?id=<?php echo $cid; ?>"> <button type="text/javascript" class='btn btn-danger'>Delete</button><?php echo "</td>" ;
echo "</tr>";
}
else{
echo "<h2 style='text-align:center;'>NO...DATA NOT FOUND</h2>";
}
}
?> -->