-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreg.php
More file actions
108 lines (102 loc) · 3.37 KB
/
reg.php
File metadata and controls
108 lines (102 loc) · 3.37 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
include "config.php";
include "library/functions.php";
if (isset($_SESSION['user'])) //Can't register if already logged in
{
header("Location: index.php");
}
// SO they're not logged in, verify they have submitted the form
$error = "";
if(isset($_POST['email']))
{
// If they have set that, then we need to check if any fields are empty
if($_POST['email'] == "" or $_POST['password'] == "")
{
$error = "You must complete all fields.";
}
// Now we attempt to register, the register function will check if they already exist
if (!register($_POST['email'], $_POST['password']))
{
$error = "A user is already registered under that email";
}
else
{
header("Location: index.php");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KJGS4HC');</script>
<!-- End Google Tag Manager -->
<title>Real Estate 7 - Register</title>
<!-- Bootstrap -->
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-theme.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-social.css">
<!-- Font CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css">
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KJGS4HC"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<?php include "navigation.php"; ?>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 hidden-xs">
<?php include "navigation_main.php"; ?>
</div>
</div>
<hr>
</div>
<section>
<div class="responsive">
<div class="container">
</section>
<hr>
<div class="container">
<div class="row">
<div class="col-lg-2"> </div>
<div class="col-lg-6">
<h3>Register</h3>
<form method="post" action="#">
<strong>Email:</strong></di><br>
<input type="text" name="email" value=""><br>
<strong>Password:</strong></di><br>
<input type="text" name="password" value=""><br><br>
<input type="submit" value="Register"><p class="error-message"><?php echo $error?></p>
</form>
</div>
</div>
</div>
</div>
<hr>
<?php
include "footer.php";
disconnect();
?>
<!-- jQuery -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Bootstrap JS --> ->
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- Custom JS -->
<script src="js/style.js"></script>
</body>
</html>