-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
process_booking.php
105 lines (99 loc) · 3.27 KB
/
process_booking.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
<?php include('header.php');
if(!isset($_SESSION['user']))
{
header('location:login.php');
}?>
<link rel="stylesheet" href="validation/dist/css/bootstrapValidator.css"/>
<script type="text/javascript" src="validation/dist/js/bootstrapValidator.js"></script>
<!-- =============================================== -->
<?php
include('form.php');
$frm=new formBuilder;
?>
</div>
<div class="content">
<div class="wrap">
<div class="content-top">
<h3>Payment</h3>
<form action="bank.php" method="post" id="form1">
<div class="col-md-4 col-md-offset-4" style="margin-bottom:50px">
<div class="form-group">
<label class="control-label">Name on Card</label>
<input type="text" class="form-control" name="name">
</div>
<div class="form-group">
<label class="control-label">Card Number</label>
<input type="text" class="form-control" name="number" required title="Enter 16 digit card number">
</div>
<div class="form-group">
<label class="control-label">Expiration date</label>
<input type="date" class="form-control" name="date">
</div>
<div class="form-group">
<label class="control-label">CVV</label>
<input type="text" class="form-control" name="cvv">
</div>
<div class="form-group">
<button class="btn btn-success">Make Payment</button>
</form>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<?php include('footer.php');?>
</div>
<?php
session_start();
extract($_POST);
include('config.php');
$_SESSION['screen']=$screen;
$_SESSION['seats']=$seats;
$_SESSION['amount']=$amount;
$_SESSION['date']=$date;
header('location:bank.php');
?>
<script>
$(document).ready(function() {
$('#form1').bootstrapValidator({
fields: {
name: {
verbose: false,
validators: {notEmpty: {
message: 'The Name is required and can\'t be empty'
},regexp: {
regexp: /^[a-zA-Z ]+$/,
message: 'The Name can only consist of alphabets'
} } },
number: {
verbose: false,
validators: {notEmpty: {
message: 'The Card Number is required and can\'t be empty'
},stringLength: {
min: 16,
max: 16,
message: 'The Card Number must 16 characters long'
},regexp: {
regexp: /^[0-9 ]+$/,
message: 'Enter a valid Card Number'
} } },
date: {
verbose: false,
validators: {notEmpty: {
message: 'The Expire Date is required and can\'t be empty'
} } },
cvv: {
verbose: false,
validators: {notEmpty: {
message: 'The cvv is required and can\'t be empty'
},stringLength: {
min: 3,
max: 3,
message: 'The cvv must 3 characters long'
},regexp: {
regexp: /^[0-9 ]+$/,
message: 'Enter a valid cvv'
} } }}
});
});
</script>