-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfirm_add.php
43 lines (37 loc) · 1.12 KB
/
firm_add.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
<?php
require 'config.php';
$name = $_POST['name'];
$des = $_POST['des'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$conn = connection();
$sql = "INSERT INTO `firm` (`firm_name`, `firm_des`, `firm_no`, `firm_add`) VALUES ('$name', '$des','$phone','$address');";
$conn = connection();
$conn->query($sql);
$sql = "SELECT * FROM `firm` ORDER BY `firm_name` ASC";
$data = $conn->query($sql);
$conn=null;
?>
<table class="table table-condensed table-hover table-bordered table-striped">
<thead>
<tr>
<th><center>S. no.</center></th>
<th><center>Name</center></th>
<th><center>Description</center></th>
<th><center>Phone</center></th>
<th><center>Address</center></th>
</tr>
</thead>
<tbody style="color:black;">
<?php $s=0;
foreach ($data as $row){ $s++; ?>
<tr>
<td><center><?php echo $s; ?></center></td>
<td><?php echo ucwords($row['firm_name']); ?></td>
<td><?php echo ucwords($row['firm_des']); ?></td>
<td><?php echo ucwords($row['firm_no']); ?></td>
<td><?php echo ucwords($row['firm_add']); ?></td>
</tr>
<?php } ?>
</tbody>
</table>