-
Notifications
You must be signed in to change notification settings - Fork 2
/
registration-recruiter.php
124 lines (120 loc) · 4.18 KB
/
registration-recruiter.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
<?php
session_start();
require_once "connect.php";
if(isset($_POST['email']) && isset($_POST['company']) && isset($_POST['pass']))
{
unset($_SESSION['recid']);
$sql_u= "select * from recruiter where email=:email";
$stmt1=$pdo->prepare($sql_u);
$stmt1->execute(array(
':email' => $_POST['email']
));
$count= $stmt1->rowCount();
if($count > 0)
{
$_SESSION['error'] = "Seems Like the User Already Exists";
header("Location: registration-recruiter.php");
return;
}
if(strcmp($_POST['pass'], $_POST['repass'])==0){
$sql="INSERT INTO recruiter(company,email, website, linkedin,profile,password)
values(:company,:email,:website,:link,:profile,:pass)";
$stmt = $pdo->prepare($sql);
$stmt->execute(array(
':company' => $_POST['company'],
':email' => $_POST['email'],
':website' => $_POST['website'],
':link' => $_POST['link'],
':profile' => $_POST['profile'],
':pass' => $_POST['pass'],
));
$_SESSION['success'] = 'Record Added';
$_SESSION['recid'] = $_POST['email'];
header("Location:dashboard-recruiter.php");
return;
}
else if(strcmp($_POST['pass'], $_POST['repass'])!=0)
{
$_SESSION['error'] = "Passwords Did Not Match";
header("Location: registration-recruiter.php");
return;
}
else
{
$_SESSION['error'] = "Seems Like the User Already Exists";
header("Location: registration-recruiter.php");
return;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Registration-Recruiter</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins&family=Roboto+Mono:wght@700&family=Roboto+Slab&family=Source+Code+Pro:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/index_style.css">
<link rel="stylesheet" type="text/css" href="css/login-reg.css">
</head>
<body>
<!-- Menu Bar -->
<div class="navbar container-fluid">
<a href="login-recruiter.php" role="button" class="btn btn-lg btn1">
LOGIN
</a>
<a href="registration-recruiter.php" role="button" class="btn btn-lg">
REGISTER
</a>
<a href="index.php" id="logo">AIBot</a>
</div>
<div class="col-sm-2">
</div>
<div class="col-sm-8 card">
<center><h2>REGISTRATION</h2></center><br>
<center>
<?php
if(isset($_SESSION['error']))
{
echo ("<h1 style='color:red;'>".htmlentities($_SESSION['error'])."</h1>\n");
unset($_SESSION['error']);
}
?></center>
<div class="col-sm-2">
</div>
<div class="col-sm-10">
<form method="post">
<p>Company </p>
<input class="text-input" type="name" pattern="^[a-zA-Z ][a-zA-Z0-9-_., ]*$" name="company" id="company" placeholder="Name " required>
<br><br>
<p>Email </p>
<input class="text-input" type="email" pattern="^[a-zA-Z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" name="email" placeholder="Email ID" required />
<br><br>
<p>Website </p>
<input class="text-input" type="text" name="website" id="website" placeholder="Enter URL">
<br><br>
<p>LinkedIn </p>
<input class="text-input" type="text" name="link" id="link" placeholder="Enter URL" />
<br><br>
<p>Profile </p>
<input class="text-input" type="text" name="profile" id="profile" placeholder="Job Profile" required>
<br><Br>
<p>Password</p>
<input class="text-input" type="password" name="pass" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" placeholder="Password" required />
<br><br>
<p>Re-Type Password</p>
<input class="text-input" type="password" name="repass" placeholder="Password Match" required /><br><br><br><br>
<input name="submit" type="submit" class="submit" value="REGISTER">
</form><br><br><br>
</div>
<br><br>
</div>
<div>
</div>
</body>
</html>