-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.php
53 lines (44 loc) · 1.11 KB
/
add.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
<?php
$done = False;
if(isset($_GET['time'])) {
$time = $_GET['time'];
$done = True;
//write to file the 'time' value
$file= fopen("addme.txt", "w") or die("Unable to open file!");
fwrite($file, $time);
fclose($file);
}
?>
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
font-family: sans-serif;
font-size: 18px;
}
</style>
<title>ParkAlert™</title>
</head>
<body>
<h2>ParkAlert™</h2>
<?php
if($done):
?>
<h3 style='color:darkgreen;'>Thank you!<br>Your selection has been processed [ Added: <?php echo $time; ?> minute(s) ]</h3>
<?php
else:
?>
<h3>How much time would you like to add to meter?</h3>
<form>
<input type="radio" name="time" value="0"> Add Nothing - $0.00<br>
<input type="radio" name="time" value="10"> Add 10 minutes - $5.00 Flat Rate<br>
<input type="radio" name="time" value="30"> Add 30 minutes - $12.00 Flat Rate<br>
<input type="radio" name="time" value="60"> Add 1 hour - $20 Flat Rate<br><br>
<em>Note:</em> The selected price will be billed to your credit card on file under CITY*PARKINGFEE.
<br><br>
<input type="submit" value="+Add Time">
</form>
<?php endif; ?>
</body>
</html>