-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsignup.php
More file actions
68 lines (54 loc) · 1.83 KB
/
signup.php
File metadata and controls
68 lines (54 loc) · 1.83 KB
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
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "resources/include/data.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "resources/include/signupValidate.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/resources/include/login.php");
$login_msg = doLogin();
?>
<html>
<body>
<head>
<title>EventHub</title>
<link rel="stylesheet" type="text/css" href="/resources/css/style.css">
<script>
function RemoveText(obj) { obj.value = ''; }
</script>
</head>
<div id="main-center">
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/resources/include/topbar.php");?>
<div id="content">
<h1>Sign up!</h1>
<div id="signup-form">
<!--form validation error messages displayed in this div-->
<div id="error-message">
<?php echo $error_message; ?>
</div>
<div id="success">
<?php
if(isset($_POST['submit']) && $error_message == '') {
echo "<p>Success! Thanks for signing up <b>{$username}</b>! <a href=\"index.php\">Click here </a>to log in.</p>";
}
?>
</div>
<form name="signup" id="user-signup" action="signup.php" method="POST">
<label for="username"/>Username:</label>
<input type="text" name="username">
<label for="email"/>Email:</label>
<input type="text" name="email">
<label for="password"/>Password:</label>
<input type="password" name="password">
<label for="confirm_password"/>Confirm Password: </label>
<input type="password" name="password_confirm">
<input class= "btn" name="submit" type="submit" value="Submit">
</form>
</div>
</div>
<div id="footer">
<a href='./index.php'>Home</a>  
<a href='./profile.php'>Profile</a>  
<a href='./logout.php'>Logout</a>
</div>
</div>
</body>
</html>
<?php
?>