-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup.php
65 lines (64 loc) · 2.02 KB
/
signup.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
<?php
require_once("includes/dbconnect.php");
if($_GET['authCode'] == NULL){
header("Location: ../index.php");
}
$stmt=$connection->prepare("Select AuthCode from Users WHERE AuthCode = ?");
$stmt->bind_param("s", $_GET['authCode']);
$stmt->execute();
$stmt->bind_result($authCode);
$stmt->fetch();
$stmt->close();
if($authCode == ""){
header("Location: index.php");
}
?>
<html>
<head>
<title>Login</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<div class="login-box">
<h3>Setup your account</h3>
<br>
<form action="Content/signup.php" method="post" role="form">
<div class="input-group">
<p>Username:</p>
<input class="form-control" type="text" name="username" id="email" placeholder="Username">
<br>
<p>Password:</p>
<input class="form-control" type="password" name="password" placeholder="Password">
<br>
<?php
echo("<input type='hidden' value='" . $authCode . "' name='authCode'>");
?>
<input type="submit" class="btn btn-info signin" value="Complete registration">
</div>
</form>
</div>
<style>
body{
background-color:#eee;
}
.login-box{
width:25%;
text-align:center;
background-color:white;
padding:25px;
border-radius:5px;
margin-top:10%;
margin-left:auto;
margin-right:auto;
}
.input-group{
margin-left:auto;
margin-right:auto;
}
.input-group .form-control{
margin-bottom:2%;
border-radius:2px !important;
}
</style>
</body>
</html>