-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (33 loc) · 966 Bytes
/
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
<?php
require "header.php";
?>
<main>
<?php
if (isset($_GET['error'])) {
if ($_GET["error"] == "emptyfields") {
echo '<p class="signuperror"> Fill in all fields. </p>';
}
if ($_GET["error"] == "error=sqlerrors") {
echo '<p class="signuperror"> There has been an error logging in. Please try again. </p>';
}
if ($_GET["error"] == "wrongpwd") {
echo '<p class="signuperror"> This password is incorrect. </p>';
}
if ($_GET["error"] == "nouser") {
echo '<p class="signuperror"> This username does not exist. </p>';
}
}
if (isset($_POST['signup-submit'])) {
require 'dbh.inc.php';
}
if (isset($_SESSION['userId'])){
echo "<p> You are logged in </p>";
}
else {
echo '<p>You are not logged in.</p>';
}
?>
</main>
<?php
Require "footer.php";
?>