-
Notifications
You must be signed in to change notification settings - Fork 0
/
query.php
103 lines (87 loc) · 3.04 KB
/
query.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
<?php
session_start();
// establishing connection
$con = mysqli_connect("localhost" , "root" , "" , "mercado");
if (mysqli_connect_errno()) {
echo "Failed to connect : " . mysqli_connect_error();
}
global $con ;
$product_id = $_GET['id'] ;
$get_pro = "SELECT * FROM products where product_id = '$product_id'" ;
$run_pro = mysqli_query($con , $get_pro) ;
$row_pro = mysqli_fetch_array($run_pro) ;
$product_id = $row_pro['product_id'] ;
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink to fit= no">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="bootstrap/css/main.css" />
</head>
<body background="pictures/random/queryPage.jpg">
<!--navigation bar-->
<?php include 'header.php'; ?>
<div class="container mt-5 pb-5">
<div class="row text-success">
<h1>Send your inquiry to the supplier</h1>
</div>
<form method="POST" action="sendingInquiry.php?id=<?php echo $product_id ; ?>">
<div class="row mt-5">
<div class="col-md-6">
<div class="form-group">
<label for="firstName"><strong>First Name:</strong></label>
<input type="text" id="firstName" name="firstName" class="form-control" placeholder="First Name" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="lastName"><strong>Last Name:</strong></label>
<input type="text" id="lastName" name="lastName" class="form-control" placeholder="Last Name" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="email"><strong>Email:</strong></label>
<input type="email" id="email" name="email" class="form-control" placeholder="Enter your email" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="phone"><strong>Mobile No:</strong></label>
<input type="tel" id="phone" name="phone" class="form-control" placeholder="Phone Number" required>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="form-group">
<label for="address"><strong>Address:</strong></label>
<input type="text" id="address" name="address" class="form-control" placeholder="Enter your address" required>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="form-group">
<label for="inquiry"><strong>Inquiry:</strong></label>
<textarea class="form-control" id="inquiry" name="inquiry" placeholder="Enter your query here" required></textarea>
</div>
</div>
</div>
<div class="row float-right">
<input type="submit" class="btn btn-success btn-send" name="sendQuery" value="Send query">
</div>
</form>
</div>
<?php include 'footer.php' ; ?>
<!--scripts-->
<script src="bootstrap/js/jquery.min.js"></script>
<script src="bootstrap/js/popper.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>