-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchangeSizeOfEvent.php
79 lines (67 loc) · 2.47 KB
/
changeSizeOfEvent.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
<!DOCTYPE HTML>
<html dir=RTL>
<head>
<meta charset="UTF-8">
<title>מערכת לניהול אירועים</title>
<link rel="stylesheet" type="text/css" href="include/cssstyle.css">
<script language="JavaScript" src="include/javascript.js"></script>
</head>
<body onLoad=mark()>
<script>document.write(header)</script>
<div id="wrapper">
<main>
<h2>שינויים בגודל האירוע </h2>
<section id="tableContainer">
<?php
// define variables and set to empty values
$Reservation_CodeErr = $Size_of_the_eventErr ="";
$Reservation_Code = $Size_of_the_event = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["Reservation_Code"])) {
$Reservation_CodeErr = "Reservation_Code is required";
} else {
$Reservation_Code = test_input($_POST["Reservation_Code"]);
// check if name only contains letters and whitespace
if (!preg_match("/^[1-9][0-9]*$/",$Reservation_Code)) {
$Reservation_CodeErr = "Only letters and white space allowed";
}
}
if (empty($_POST["Size_of_the_event"])) {
$Size_of_the_eventErr = "Size_of_the_event is required";
} else {
$Size_of_the_event = test_input($_POST["Size_of_the_event"]);
// check if name only contains letters and whitespace
if (preg_match("'/^-?[0-9]{1,4}$/'",$Size_of_the_event)) {
$Size_of_the_eventErr = "Only letters and white space allowed";
}
}
}
?>
<p><span class="error">* required field.</span></p>
<form style="color:blue;font-family : arial;" method="post" action="addc.php"<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>>
Reservation_Code :
<select name="Reservation_Code">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="10">12</option>
</select>
<br><br>
Size_of_the_event: <input type="text" name="Size_of_the_event">
<br><br>
<input type="submit" name="submit" value="Submit">
</form>
</section>
</main>
<script>document.write(sideNav)</script>
<script>document.write(footer)</script>
</div>
</body>
</html>