-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
154 lines (127 loc) · 5.67 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
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();
include("pages/loggedin.php");
include("validation.php");
if (isset($_POST['username_check'])) {
$username = $_POST['username'];
$sql = "SELECT * FROM student,instructor WHERE student.ID='$username' OR instructor.ID='$username'";
$results = mysqli_query($con, $sql);
if (mysqli_num_rows($results) > 0) {
echo "taken";
} else {
echo 'not_taken';
}
exit();
}
if (isset($_POST['email_check'])) {
$email = $_POST['email'];
$sql = "SELECT * FROM student,instructor WHERE student.email='$email' OR instructor.email='$email'";
$results = mysqli_query($con, $sql);
if (mysqli_num_rows($results) > 0) {
echo "taken";
} else {
echo 'not_taken';
}
exit();
}
?>
<!--DESIGNED BY AVISHEK CHOWDHURY-->
<html>
<head>
<title>SIGNUP</title>
<meta charset="UTF-8">
<meta name="OCA" content="Online Class Material, Classroom, Free courses">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="icon.png" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Acme">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>
<div class="row-1">
<div class="header col-12">
<?php
include("options/header.php");
?>
</div>
</div>
<div class="row-2">
<div class="navbar col-12">
<nav>
<?php
include("options/navbar.php");
?>
</nav>
</div>
</div>
<div class="row-3">
<div class="menu col-3">
</div>
<div class="main col-6">
<form id="form" autocomplete="on" target="_self" enctype="multipart/form-data" method="POST">
<h2>SIGN UP</h2>
<label for="user"></label>
<select id="user" name="user" size="1" required autofocus>
<option value="">Register As</option>
<option value="instructor">INSTRUCTOR</option>
<option value="student">LEARNER</option>
</select><br>
<label for="photo"></label>
<button id="photo" onclick="document.getElementById('user_photo').click()" title="Upload Your Photo">Upload
Your Photo</button>
<input type="file" id="user_photo" name="user_photo" accept="image/*" style="display: none;"><br>
<label for="name"></label>
<input type="text" id="name" name="name" placeholder="Full Name" pattern="[A-Za-z ]{3,}" title="Enter your Full Name" required><br>
<div>
<label for="username"></label>
<input type="text" id="username" name="username" placeholder="ID/USERNAME" pattern="[A-Za-z0-9]{4,}" maxlength="14" title="Enter your ID/a unique username(maximum 13 characters)" required><br>
<span></span>
</div>
<div>
<label for="email"></label>
<input type="email" id="email" name="email" placeholder="E-mail Address" title="Enter your E-mail Address" required><br>
<span></span>
</div>
<label for="phone_num"></label>
<input type="tel" id="phone_num" name="phone_num" placeholder="Phone Number" pattern="[0-9]{11}" title="Enter your 11 digit phone Number"><br>
<label for="bdate">Enter your birthdate</label><br>
<input type="date" id="bdate" name="bdate" title="Enter your birthdate" min="1972-01-01" max="2020-06-26"><br>
<fieldset>
<legend>Gender</legend>
<input type="radio" id="male" name="gender" value="Male" required>
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="Female">
<label for="female">Female</label>
</fieldset><br>
<fieldset>
<legend>LANGUAGES</legend>
<input type="checkbox" id="bangla" name="lang[]" value="Bangla">
<label for="instructor">Bangla</label><br>
<input type="checkbox" id="english" name="lang[]" value="English">
<label for="student">English</label>
</fieldset><br>
<label for="about"></label>
<textarea rows="5" cols="45" id="about" name="about" maxlength="101" placeholder="Write a short description about you...(maximum 101 characters)" title="Write here something about you. It will be displayed in your About section"></textarea><br>
<label for="pass"></label>
<input type="password" id="pass" name="pass" placeholder="PASSWORD" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 6 or more characters" required><br><br>
<button type=" reset" onclick="alert('Form Reset!')">RESET</button>
<button type="submit" value="submit" name="signup">SIGNUP</button><br><br>
</form>
</div>
<div class="sidebar col-3">
</div>
</div>
<div class="row-4">
<div class="footer col-12">
<footer>
<?php
include("options/footer.php");
?>
</footer>
</div>
</div>
</body>
</html>
<!-- scripts -->
<script src="jquery-3.5.1.min.js"></script>
<script src="script.js"></script>