-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
83 lines (78 loc) · 2.48 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!Doctype html>
<html>
<head>
<link href="style/style.css" type "text/css" rel="stylesheet"/>
<link href="style/ind.css" type "text/css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<title>Messaging</title>
</head>
<body>
<?php
if(isset($_GET['invalidLogin'])){
?>
<div class="error">
Error invalid login<br>
</div>
<?php
}
if(isset($_GET['signOut'])){
?>
<div class="exit">
You have successfully logged out<br>
</div>
<?php
}
?>
<div class = "background">
<div class = "header">
<h1> Messaging</h1>
</div>
<div class = "Entry">
<a class="button" id="login">Login</a>
<a class="button" id="signUp">Sign Up</a>
</div>
<div class = "loginForm">
<form action="login.php" method="POST">
Email:<br>
<input type = "text" name= "enterEmail" required />
<br>Password:<br>
<input type="password" name="enterPassword" required />
<br>
<input type="submit" name="loginSubmit" class="formButton" value="submit">
<input type="reset" name="loginCancel" id="cancelLogin" class="formButton" onclick="hideLogin()" value="cancel">
</form>
</div>
<div class = "signUpForm">
<form action="signUp.php" method="POST">
Register Email:<br>
<input type = "text" name="registerEmail" required>
<br>Register Password:<br>
<input type="password" name="registerPassword" required>
<br>
<input type="submit" name="registerSubmit" class="formButton" value="submit">
<input type="reset" name="registerCancel" id="cancelSignUp" class="formButton" onclick="hideRegister()" value="cancel">
</form>
</div>
</div>
<script type = "text/javascript">
$(document).ready(function(){
$(".loginForm").hide();
$(".signUpForm").hide();
$("#login").click(function(){
$(".loginForm").show();
$(".signUpForm").hide();
})
$("#cancelLogin").click(function(){
$(".loginForm").hide();
})
$("#signUp").click(function(){
$(".signUpForm").show();
$(".loginForm").hide();
})
$("#cancelSignUp").click(function(){
$(".signUpForm").hide();
})
})
</script>
</body>
</html>