-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofordelb.php
114 lines (102 loc) · 3.36 KB
/
profordelb.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
<!DOCTYPE html>
<html>
<head><title>process order</title>
<script type="text/javascript">
function fun(){
var a=document.forms["mydelb"]["noo"].value;
var b=document.forms["mydelb"]["order[]"].value;
var c=document.forms["mydelb"]["id"].value;
if(a==""||b==""||c==""){
alert("Please Enter all the Coresponding Values");
return false;
}
}
</script>
</head>
<body style="background-image:url(imagesd.jpg);background-repeat:no-repeat;background-size:100% 125%;background-attachment:fixed">
<header>
<h1><center><i><b>DAVANGERE WATERCAN SUPPLY</b></i></center></h1>
<h2><center><i><b>PROCESSING FOR DELIVERY</b></i></center></h2>
</header>
<?php
$connection = mysqli_connect("localhost","root","") or die("coudnt connect to the server");
$db = mysqli_select_db($connection,"watersupply") or die("coudnt select the database");
$query="SELECT workerid,workername FROM workers WHERE workerid>2";
$result = mysqli_query($connection,$query) or die("Querry failed:".mysqli_error($connection));
echo "<table border='1' align='center' frame='box' bgcolor='#00bfff'>";
echo "<tr>";
echo "<th>Delivery Man's id</th><th>Delivery Man's Name</th>";
echo "</tr>";
while($row=mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>",$row['workerid'],"</td><td>",$row['workername'],"</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($connection);
?>
<?php
echo "<br>";
echo "<br>";
$connection = mysqli_connect("localhost","root","") or die("coudnt connect to the server");
$db = mysqli_select_db($connection,"watersupply") or die("coudnt select the database");
if(isset($_POST['noo'])){
$noo = $_POST['noo'];
}
$connection = mysqli_connect("localhost","root","") or die("coudnt connect to the server");
$db = mysqli_select_db($connection,"watersupply") or die("coudnt select the database");
$query="SELECT * FROM profrdel";
$result = mysqli_query($connection,$query) or die("Querry failed:".mysqli_error($connection));
echo "<table border='1' align='center' frame='box' bgcolor='#00bfff'>";
echo "<tr>";
echo "<th>Order No</th><th>Name</th><th>Phone No</th><th>Adrdess</th><th>Landmark</th><th>No of Cans</th><th>Amount</th>";
echo "</tr>";
while($row=mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>",$row['ordno'],"</td><td>",$row['name'],"</td><td>",$row['PhoneNo'],"</td><td>",$row['address'],"</td><td>",$row['landmark'],"</td><td>",$row['noc'],"</td><td>",$row['amt'],"</td>";
echo "</tr>";
}
echo "<h3><center><i><b>Enter the Order Numbers</b></i></center></h3>";
echo "</table>";
echo "<br>";
echo "<br>";
echo "<center>";
echo "<form id='mydelb' action='delasdone.php' method='post'>";
for($i=0;$i<$noo;$i++)
{
echo "<i><b>Order No</b></i> :<input type='text' name='order[]' class='class_name' size=5 /><br/>";
}
echo "<center>";
echo "<table>";
echo "<tr>";
echo "<td>";
echo "<b><i>Enter Worker's id :</i></b>";
echo "</td>";
echo "<td>";
echo "<input type='text' placeholder='Worker's id' name='id'>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<b><i>Enter No of Orders:</i></b>";
echo "</td>";
echo "<td>";
echo "<input type='text' placeholder='No Of Orders' name='noo'>";
echo "</td>";
echo "</tr>";
echo "</center>";
echo "</table>";
echo "<center>";
echo "<br>";
echo "<br>";
echo "<button id='subd'><b>ADD FOR DELIVERY</b></button>";
echo "<br>";
echo "<br>";
echo "</center>";
echo "</form>";
mysqli_close($connection);
?>
</body>
</html>