-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuy-Now.php
More file actions
57 lines (52 loc) · 2.02 KB
/
Buy-Now.php
File metadata and controls
57 lines (52 loc) · 2.02 KB
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
<?php
include_once("header.php");
?>
<div class="container od">
<header class="odd">
<h1>Cake Order Now</h1>
</header>
<form class="order-form" name="info" onsubmit="Valid()" method="post">
<div class="form-group">
<label for="name">Your Name:</label>
<input type="text" id="name" name="name" autofocus placeholder="Enter your name">
</div>
<div class="form-group">
<label for="address">Delivery Address:</label>
<textarea id="address" name="address" rows="4"
placeholder="Enter your delivery address" minlength="20" maxlength="40"></textarea>
</div>
<div class="form-group">
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" placeholder="Enter your phone number" min="10" max="10" pattern="[7-8-6-9]{1},[0-9]{9}">
</div>
<div class="form-group">
<label for="delivery-date">Select Delivery Date:</label>
<input type="date" id="delivery-date" name="delivery-date">
</div>
<a href="./ordered.php"><input type="submit" value="Place Order"></a>
<!-- <button class="submit-btn">Place Order</button> -->
</form>
</div>
<script>
function Valid(){
if(document.info.name.value == ""){
alert("Please Enter Valid Name");
return false;
}
if(document.info.address.value == ""){
alert("Please Enter Valid Address");
return false;
}
if(document.info.phone.value == ""){
alert("Please Enter Valid Mobile number");
return false;
}
if(document.info.delivery-date.value == ""){
alert("Please Enter Valid Date");
return false;
}
return true;
}
</script>
</body>
</html>