-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchStudent.php
More file actions
110 lines (104 loc) · 2.77 KB
/
Copy pathsearchStudent.php
File metadata and controls
110 lines (104 loc) · 2.77 KB
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
<?php
include("connection.php");
$result = $connection->query("SELECT * FROM student");
if( $_SERVER['REQUEST_METHOD']==="POST"){
$stName = $_POST["st_name"];
$stLastName = $_POST["st_lastName"];
$stTazkira = $_POST["tazkira_num"];
$imgUrl = $_POST["imgUrl"];
$class = $_POST["class"];
$query = "SELECT id,st_name , st_lastName, tazkira_num,imgurl,class FROM student WHERE st_name LIKE %'$st_name'% AND LIKE %'$stLastName'% AND LIKE %'$stTazkira'% AND LIKE %'$st_lName'% AND LIKE%' $imgUrl'% AND LIKE%' $class'%";
$result = $connection->query($query);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="navbar.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
form{
display: grid;
grid-template-columns: 3;
}
.parent1{
position: relative;
width: 50%;
height:50%;
margin:0 auto;
background: rgb(4, 73, 116);
color:white;
}
table{
text-align: center;
margin: auto;
border: 1px solid white;
box-shadow: 8px 8px 12px rgb(4, 73, 116);
margin-top: 10%;
color:white;
}
tr{
border: 1px solid white;
padding: 10px;
border-radius: 4px;
}
th{
border: 1px solid white;
text-align: center;
}
td{
border: 1px solid white;
text-align: center;
}
</style>
</head>
<body>
<nav>
<div>
<h1>Sharifi Programing Center</h1>
</div>
<div>
</div>
<div class=" third-group"><button style="margin:6px" ><a style="margin:6px auto; text-decoration:none;" href="insertstudent.php"> Add new student</a></button>
</div>
</nav>
<div class="parent1.">
<div class="paren.t">
</div>
<?php
if($result->num_rows>0){?>
<div class="parent1">
<div class="parent">
<table>
<tr>
<th>Name</th>
<th>Last Name</th>
<th>Tazkira Number</th>
<th>img Url</th>
<th>Class</th>
<th>Delete</th>
<th>Update</th>
</tr>
<?php
while($row = $result->fetch_assoc()){?>
<tr>
<td><?php echo $row["st_name"]?></td>
<td><?php echo $row["st_lastName"]?></td>
<td><?php echo $row["tazkira_num"]?></td>
<td><?php echo $row["imgUrl"]?></td>
<td><?php echo $row["class"]?></td>
<td><a style="margin:6px auto; text-decoration:none; color:white" href="delet.php?id=<?php echo $row['id'] ?>">Delete</a></td>
<td><a
style="margin:6px auto; text-decoration:none; color:white"
href="update.php?id=<?php echo $row['id'] ?>">Update</a></td>
</tr>
<?php }?>
</table>
</div>
</div>
<?php }?>
</div>
</body>
</html>