-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd-order.php
69 lines (67 loc) · 3.04 KB
/
add-order.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
<?php require './components/header.php' ?>
<?php require './backend/Connection.php' ?>
<div class="container">
<div class="">
<form action="./backend/CarService.php" method="post">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Customer</label>
<select class="form-control" name="customerId" aria-label="Default select example" required>
<?php
$sql = "SELECT * FROM musteri";
$result = mysqli_query($connection, $sql);
$check = mysqli_num_rows($result);
if($check > 0){
?>
<?php while($row = mysqli_fetch_assoc($result)){ ?>
<option value="<?php echo $row['Customer_id']; ?>"><?php echo $row['Name']; ?></option>
<?php
}
?>
<?php
}
?>
</select>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Vehicle Model</label>
<select class="form-control" name="modelId" aria-label="Default select example" required>
<?php
$sql = "SELECT * FROM models";
$result = mysqli_query($connection, $sql);
$check = mysqli_num_rows($result);
if($check > 0){
?>
<?php while($row = mysqli_fetch_assoc($result)){ ?>
<option value="<?php echo $row['Model_id']; ?>"><?php echo $row['Brand'].'-'.$row['ModelName']; ?></option>
<?php
}
?>
<?php
}
?>
</select>
</div>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Service Type</label>
<select class="form-control" name="serviceId" aria-label="Default select example" required>
<?php
$sql = "SELECT * FROM services";
$result = mysqli_query($connection, $sql);
$check = mysqli_num_rows($result);
if($check > 0){
?>
<?php while($row = mysqli_fetch_assoc($result)){ ?>
<option value="<?php echo $row['ServiceID']; ?>"><?php echo $row['ServiceName']; ?></option>
<?php
}
?>
<?php
}
?>
</select>
</div>
<button class="btn btn-primary" type="submit" name="add-order-btn">Add Order</button>
</form>
</div>
</div>
<?php require './components/footer.php' ?>