-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex1
More file actions
28 lines (24 loc) · 738 Bytes
/
index1
File metadata and controls
28 lines (24 loc) · 738 Bytes
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
require("../includes/config.php");
if ($_SERVER["REQUEST_METHOD"] == "GET")
{
$rows1 = query("SELECT college FROM colleges WHERE 1");
$positions = [];
foreach($rows1 as $row1)
{
$positions[] = [
"college" => $row1["college"]
];
}
render("template2.php", ["positions" => $positions, "title" => "Compare"]);
}
else if($_SERVER["REQUEST_METHOD"] == "POST")
{
$college = $_POST["collegeselect"];
// gets portfolio information belonging to user
$rows = query("SELECT * FROM colleges WHERE college = ?", $college);
if ($rows != FALSE)
{
render("template3.php", ["rows" => $rows]);
}
}
?>