-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregistration.php
154 lines (146 loc) · 5.96 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
session_start();
error_reporting(0);
include("dbconnection.php");
if(isset($_POST['submit']))
{
$name=$_POST['name'];
$email=$_POST['email'];
$password=$_POST['password'];
$mobile=$_POST['phone'];
$gender=$_POST['gender'];
$query=mysqli_query($con,"select email from user where email='$email'");
$num=mysqli_fetch_array($query);
if($num>1)
{
echo "<script>alert('Email-id already register with us. Please try with diffrent email id.');</script>";
echo "<script>window.location.href='registration.php'</script>";
}
else
{
mysqli_query($con,"insert into user(name,email,password,mobile,gender) values('$name','$email','$password','$mobile','$gender')");
echo "<script>alert('Successfully register with us. Now you can login');</script>";
echo "<script>window.location.href='login.php'</script>";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta charset="utf-8" />
<title>CRM | Registration</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta content="" name="description" />
<meta content="" name="author" />
<link href="assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/plugins/boostrapv3/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/boostrapv3/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/custom-icon-set.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
function checkpass()
{
if(document.signup.password.value!=document.signup.cpassword.value)
{
alert('New Password and Re-Password field does not match');
document.signup.cpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body class="error-body no-top">
<div class="container">
<div class="row login-container column-seperation">
<div class="col-md-5 col-md-offset-1">
<h2>Sign in to CRM</h2>
<p> <a href="login.php">Sign in!</a> for a webarch account,It's free and always will be..</p>
<br>
</div>
<div class="col-md-5 "> <br>
<form id="signup" name="signup" class="login-form" onsubmit="return checkpass();" method="post">
<div class="row">
<div class="form-group col-md-10">
<label class="form-label">Name</label>
<div class="controls">
<div class="input-with-icon right">
<input type="text" name="name" id="name" class="form-control" required="true">
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-10">
<label class="form-label">Email id</label>
<div class="controls">
<div class="input-with-icon right">
<input type="email" name="email" id="email" class="form-control" required="true">
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-10">
<label class="form-label">Password</label>
<div class="controls">
<div class="input-with-icon right">
<input type="password" name="password" id="password" class="form-control" required="true">
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-10">
<label class="form-label">Re-Password</label>
<span class="help"></span>
<div class="controls">
<div class="input-with-icon right">
<input type="password" name="cpassword" id="cpassword" class="form-control" required="true">
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-10">
<label class="form-label">Contact no.</label>
<span class="help"></span>
<div class="controls">
<div class="input-with-icon right">
<input type="text" name="phone" id="txtpassword" class="form-control" pattern="[0-9]{10}" title="10 numeric characters only" required="true">
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-10">
<label class="form-label">Gender</label>
<span class="help"></span>
<div class="controls">
<div class="input-with-icon right">
<input type="radio" value="m" name="gender" checked > Male
<input type="radio" value="f" name="gender" > Female
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<input class="btn btn-primary btn-cons pull-right" name="submit" value="Submit" type="submit" />
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/plugins/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/plugins/pace/pace.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="assets/js/login.js" type="text/javascript"></script>
</body>
</html>