-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
49 lines (49 loc) · 1.05 KB
/
index.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
<?php
function redirect_to($new_location) {
header("Location: " . $new_location);
exit;
}
?>
<?php
$view = " ";
if (isset($_POST['submit'])) {
$campus = $_POST['campus'];
if ($campus=="blank") {
$view = "<b>Select your campus!</b>";
} else {
$view = " ";
if ($campus=="vitcc") {
redirect_to("vitcc/public/login.php");
} elseif ($campus=="creane") {
redirect_to("creane/public/login.php");
}
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Cambuzz</title>
</head>
<body>
<center>
<h1>Cambuzz</h1>
<p>A new way of exploring your campus</p>
<p>
<form action="index.php" method="post">
<select name="campus" required>
<option value="blank">Select Your Campus</option>
<option value="vitcc">Vellore Institute of Technology, Chennai Campus</option>
<option value="creane">Creane Memorial School, Gaya</option>
</select>
<input type="submit" name="submit" value="Go!">
</form>
</p>
<p>
<?php
echo $view;
?>
</p>
</center>
</body>
</html>