-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.php
83 lines (67 loc) · 2.47 KB
/
registration.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
<?php
//i will add this for testing
include_once 'user.php';
$user = new User();
// Checking for user logged in or not
if (isset($_REQUEST['submit'])){
extract($_REQUEST);
$register = $user->reg_user($fname,$lname,$username,$password,$email);
if ($register) {
// Registration Success
echo '<h1>Registration successful <a href="login.php">Click here</a> to login</h1>';
} else {
// Registration Failed
echo 'Registration failed. Email or Username already exits please try again';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login EDiary</title>
<!-- Google Fonts -->
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700|Lato:400,100,300,700,900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/animate.css">
<!-- Custom Stylesheet -->
<link rel="stylesheet" href="css/logreg.css">
</head>
<body>
<div class="container">
<div class="top">
<h1 id="title" class="hidden"><span id="logo">Registration</span></h1>
</div>
<div class="login-box animated fadeInUp">
<form action="#" method="post" name="reg">
<div class="box-header">
<h2>Registration</h2>
</div>
<label for="fname">First Name</label>
<br/>
<input type="text" id="fname" name="fname" required=""/>
<br/>
<label for="lname">Last Name</label>
<br/>
<input type="text" id="lname" name="lname" required=""/>
<br/>
<label for="username">Username</label>
<br/>
<input type="text" id="username" name="username" required=""/>
<br/>
<label for="email">Email</label>
<br/>
<input type="email" id="email" name="email" required=""/>
<br/>
<label for="password">Password</label>
<br/>
<input type="password" id="password" name="password" required=""/>
<br/>
<button type="submit" name="submit" id="submit">Register</button>
<br/>
<a href="login.php"><p>Already registered! Click Here!</p></a>
</form>
</div>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="js/login_form.js"></script>