-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess.php
executable file
·146 lines (136 loc) · 5.58 KB
/
process.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Dynamic Form Processing with PHP | Tech Stream</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="css/default.css"/>
</head>
<body>
<form action="" class="register">
<h1>YouAreBUS Ticket Reservation</h1>
<?php if(isset($_POST)==true && empty($_POST)==false):
$chkbox = $_POST['chk'];
$bus = $_POST['bus'];
$day = $_POST['day'];
$month = $_POST['month'];
$mob = $_POST['mob'];
$type = $_POST['type'];
$from = $_POST['from'];
$to=$_POST['to'];
$root=$_POST['root'];
$BX_NAME=$_POST['BX_NAME'];
$BX_age=$_POST['BX_age'];
$BX_gender=$_POST['BX_gender'];
$BX_birth=$_POST['BX_birth'];
?>
<fieldset class="row1">
<legend>Travel Information</legend>
<p>
<label>BUS Name
</label>
<input name="bus" type="text" readonly="readonly" value="<?php echo $bus ?>"/>
<label>Date of journey
</label>
<input type="text" readonly="readonly" class="small" value="<?php echo $day ?>"/>
<input type="text" readonly="readonly" class="small" value="<?php echo $month ?>"/>
<input type="text" readonly="readonly" class="small" value="2013"/>
<label>Bus Type
</label>
<input type="text" readonly="readonly" value="<?php echo $type ?>"/>
</p>
<p>
<label>Boarding From
</label>
<input name="from" type="text" readonly="readonly" value="<?php echo $from ?>"/>
<label>To
</label>
<input name="to" type="text" readonly="readonly" value="<?php echo $to ?>"/>
<label>Via (Root)
</label>
<input type="text" readonly="readonly" value="<?php echo $root ?>"/>
</p>
<p>
<label>Mobile
</label>
<input name="mob" type="text" readonly="readonly" value="<?php echo $mob ?>"/>
<label >(You will receive
</label><label >the ticket in this )
</label>
</p>
<div class="clear"></div>
</fieldset>
<fieldset class="row2">
<legend>Passenger Details
</legend>
<table id="dataTable" class="form" border="1">
<tbody>
<?php foreach($BX_NAME as $a => $b){ ?>
<tr>
<p>
<td >
<?php echo $a+1; ?>
</td>
<td>
<label>Name</label>
<input type="text" readonly="readonly" name="BX_NAME[$a]" value="<?php echo $BX_NAME[$a]; ?>">
</td>
<td>
<label for="BX_age">Age</label>
<input type="text" readonly="readonly" class="small" name="BX_age[]" value="<?php echo $BX_age[$a]; ?>">
</td>
<td>
<label for="BX_gender">Gender</label>
<input type="text" readonly="readonly" name="BX_gender[]" value="<?php echo $BX_gender[$a]; ?>">
</td>
<td>
<label for="BX_birth">Berth Pre</label>
<input type="text" readonly="readonly" name="BX_birth[]" value="<?php echo $BX_birth[$a]; ?>">
</td>
</p>
</tr>
<?php } ?>
</tbody>
</table>
<div class="clear"></div>
</fieldset>
<fieldset class="row3">
<legend>Further Information</legend>
<p>The identification details are required during journey. One of the passenger booked on the ticket should have any of the identity cards ( Passport / PAN Card / Driving License / Photo ID card issued by Central / State Govt / Student Identity Card with photograph) during the journey in original. </p>
<div class="clear"></div>
</fieldset>
<fieldset class="row5">
<legend>Terms and Mailing</legend>
<p>
<input class="submit" type="button" value="Make Payment »" />
<a class="submit" href="index.html" type="button"> Back To Demo <a/>
<a class="submit" href="http://techstream.org/Web-Development/PHP/Dynamic-Form-Processing-with-PHP"/>Back to Tech Stream Article</a>
</p>
<div class="clear"></div>
</fieldset>
<?php else: ?>
<fieldset class="row1">
<legend>Sorry</legend>
<p>Some things went wrong please try again.</p>
</fieldset>
<?php endif; ?>
<div class="clear"></div>
</form>
</body>
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project=9046834;
var sc_invisible=1;
var sc_security="ec55ba17";
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
</script>
<noscript><div class="statcounter"><a title="free hit
counter" href="http://statcounter.com/" target="_blank"><img
class="statcounter"
src="http://c.statcounter.com/9046834/0/ec55ba17/1/"
alt="free hit counter"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->
</html>