-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
38 lines (34 loc) · 978 Bytes
/
test.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
<form method="POST">
<label>Стипендия: <input type="number" name="stipeng"></label>
<input type="submit" name="send" value="Найти">
</form>
<br>
<?php
if (isset($_POST['stipend'])) {
$conn = new mysqli($servername, $username, $password, $dbname);
$sql = "SELECT FAM, NAZV_S,STIP FROM STUDENT
INNER JOIN SPEC ON SPEC.KOD_S = STUDENT.KOD_S
WHERE STIP >=$_POST['stipend']";
$result = $conn->query($sql);
if ($result->num_rows > 0)
{
echo "
<table>
<tr>
<th>ФАМИЛИЯ</th>
<th>СПЕЦМАЛЬНОСТЬ</th>
<th>СТИПЕНДИЯ</th>
</tr>";
while ($row = $result->fetch_assoc())
{
echo
"<tr>
<td>$row[FAM]</td>
<td>$row[NAZV_S]</td>
<td>$row[STIP]</td>
</tr>";
}
echo "</table>";
}
}
?>