-
Notifications
You must be signed in to change notification settings - Fork 1
/
valid_user.php
54 lines (44 loc) · 1.31 KB
/
valid_user.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
<?php
require_once 'db_con.php';
require_once 'header.php';
?>
<div class="container-fluid">
<div class="row" id="wrapper">
<?php require_once 'menubar.php';?>
<div class="col-md-6">
<br><br>
<h2 style="font-family:Bernard MT Condensed; color:#06857C;">Register User Account</h2>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
Register
</h3>
</div>
<div class="panel-body">
<?php
$isOk = false;
if(isset($_POST['submit'])){
$student_id = $_POST['student_id'];
$sql_id = "SELECT roll FROM student";
$result_id = mysqli_query($conn,$sql_id);
while($row_id = mysqli_fetch_array($result_id)){
$s_id = $row_id['roll'];
if($s_id == $student_id){
$isOk = true;
header('Location:register.php');
}
}
if(!$isOk){
echo "invalid ID";
}
}
?>
<form action="valid_user.php" method="post" class = "form-signin" role = "form">
<input type="text" name="student_id" class="form-control" placeholder="Student ID">
<input type="submit" name="submit" value="Proceed" class="btn btn-success">
</form>
</div>
</div>
</div>
</div>
</div>