-
Notifications
You must be signed in to change notification settings - Fork 0
/
corder.php
89 lines (67 loc) · 2.59 KB
/
corder.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
<?php
include 'connect.php';
if(isset($_POST['submit']))
{
$Customer_iD=$_POST['Customer_ID'];
$Customer_name=$_POST['Customer_Name'];
$Addres=$_POST['Address'];
$Phone_number=$_POST['Phone_Number'];
$Medicinee=$_POST['Medicine'];
$sql="insert into `orderdetails`(Order_ID,Customer_ID,Customer_Name,Address,Phone_Number,Medicine)
values('','$Customer_iD','$Customer_name','$Addres','$Phone_number','$Medicinee')";
$result=mysqli_query($con,$sql);
if($result){
echo "data inserted successfully";
header('location:odisplay.php');
}
else{
die(mysqli_error($con));
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="drug1.css">
</head>
<body>
<div class="container">
<p>
<h2>Confirm Orders</h2>
<form method="post">
<div class="mb-3">
<label>Customer ID</label>
<input type="text" class="form-control" placeholder="Enter customer id" name="Customer_ID"
autocomplete="off">
</div>
<div class="mb-3">
<label>Customer Name</label>
<input type="text" class="form-control" placeholder="Enter customer name" name="Customer_Name"
autocomplete="off">
</div>
<div class="mb-3">
<label>Customer Address</label>
<textarea class="form-control" placeholder=" Enter customer address" name=" Address" autocomplete="off"
id="floatingTextarea2" style="height: 100px"></textarea>
<!-- <label for="floatingTextarea2">Order drugs</label> -->
<!-- <input type="text" class="form-control"
placeholder="Enter customer address"
name="Address"autocomplete="off"> -->
</div>
<div class="mb-3">
<label>Phone Number</label>
<input type="text" class="form-control" placeholder="Enter contact number" name="Phone_Number"
autocomplete="off">
</div>
<div class="mb-3">
<textarea class="form-control" placeholder=" Enter order drugs" name="Medicine" autocomplete="off"
id="floatingTextarea2" style="height: 100px"></textarea>
<label for="floatingTextarea2">Order drugs</label>
</div>
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</form>
</body>
</html>