-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
66 lines (62 loc) · 3.13 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
66
<?php
require_once './php/DBConnect.php';
$db->authLogin();
$title="Signup";
include './layout/_header.php';
$message=NULL;
if(isset($_POST['createBtn'])){
if($_POST['password'] == $_POST['cpassword']){
$message = $db->signupCreate($_POST['username'], $_POST['password']);
}else{
$message = "Password Error!";
}
}
?>
<nav class="navbar fixed-top navbar-expand-lg" style="background: #00000040;box-shadow: 0px 0px 16px 5px #1f1d1d;">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="./favicon.png" alt="" width="60" height="40" class="d-inline-block align-text-top">
<?=$metaData[0]['logo_small_name']?>
</a>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
</ul>
</div>
</nav>
<div class="loginPgCon">
<div style="width: 90%;margin: auto;padding-top: 2rem;">
<div class="col-md-6">
<?php if(isset($message)): ?>
<div class="alert-danger shadow rounded" style="text-align: center;padding: 7px;font-size: 1.6rem;"><?= $message; ?></div>
<?php endif; ?>
<div class="panel panel-default shadow rounded bg-light p-4">
<div class="panel-heading d-flex" style="border-bottom: 1px solid grey;">
<div class="col-md-6 m-4">
<img src="./assets/img/security-icon.png" alt="security-icon" class="img img-responsive img-thumbnail shadow mb-4">
</div>
<h4 class="text-secondary text-center" style="text-shadow: 3px 3px 5px #d8d0d0;"><i class="fas fa-database"></i> Signup </h4>
</div>
<div class="panel-body">
<form class="form-vertical" role="form" method="post" action="<?=$_SERVER['PHP_SELF']?>">
<div class="form-group m-2">
<input type="email" class="form-control shadow mb-3" required="true" name="username" placeholder="Email">
</div>
<div class="form-group m-2">
<input type="password" required="true" class="form-control shadow mb-3" name="password" placeholder="Password">
</div>
<div class="form-group m-2">
<input type="password" required="true" class="form-control shadow mb-3" name="cpassword" placeholder="Confirm Password">
</div>
<div class="form-group createBtn m-2">
<button type="submit" name="createBtn" class="btn btn-primary btn-sm"><i class="fas fa-sign-in-alt"></i> Create</button>
<a href="./login.php" class="btn btn-sm btn-warning">Have An Account</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>