-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfind-result.php
83 lines (74 loc) · 2.21 KB
/
find-result.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
<?php
session_start();
$showAlert = false;
$showError = false;
include "includes/connection.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/pg1.css">
<title>Search Result</title>
</head>
<body>
<?php
if($showAlert){
echo '<script>alert("Record Added Successfully!")</script>';
}
if($showError){
echo '<script>alert("Error! Try Again.")</script>';
}
?>
<div class="main">
<div class="in">
<form action="result.php" method="post">
<div class="in1">
<label for="branch_id">
Branch :
</label>
<select name="branch_id" id="branch_id" required>
<option value="">Select Branch</option>
<?php
$sql = "SELECT * from `branch`";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)){
?>
<option value="<?php echo $row['branch_id']; ?>" style="font-size:17px"><?php echo $row['branch'];?></option>
<?php } ?>
</select>
</div>
<div class="in2">
<label for="sem_id">
Semester :
</label>
<select name="sem_id" id="sem_id" required>
<option value="">Select Semester</option>
<?php
$sql = "SELECT * from `semester`";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)){
?>
<option value="<?php echo $row['sem_id']; ?>" style="font-size:17px"><?php echo $row['semester'];?></option>
<?php } ?>
</select>
</div>
<div class="in3">
<label for="">
Enter Roll No :
</label>
<input type="text" required name="stid">
</div>
<div class="in4">
<button type="submit">Search</button>
</div>
</form>
<div class="e">
<a href="index.php">Back to Home</a>
</div>
</div>
</div>
</body>
</html>