forked from prasangafdo/RapidDeliveryweb1.5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselectCourier.php
50 lines (44 loc) · 914 Bytes
/
selectCourier.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
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
require 'connect.php';
$sql = "SELECT ID, parcel_ID, address, telephone FROM
courier";
//0 is for no parcels
if (mysqli_query($con, $sql)) {
$results = mysqli_query($con, $sql) or die(mysql_error());
echo "<table border=\"2\">";
$x=1;
echo "<tr>";
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)) {
if ($x <= 1)
{
$x = $x + 1;
extract($row);
echo "<td style=\"padding-right:35px;\">";
echo $ID .'<br/>';
echo "<td style=\"padding-right:15px;\">";
echo $parcel_ID .'<br/>';
echo "</td>";
echo "<td style=\"padding-right:15px;\">";
echo $address .'<br/>';
echo "</td>";
echo "<td style=\"padding-right:15px;\">";
echo $telephone .'<br/>';
echo "<td style=\"padding-right:15px;\">";
echo "</td>";
}
$x=0;
echo "</tr><tr>";
}
echo "</table>";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($con);
}
?>
</body>
</html>