This repository was archived by the owner on Aug 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInquire.php
More file actions
40 lines (39 loc) · 1.58 KB
/
Inquire.php
File metadata and controls
40 lines (39 loc) · 1.58 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
<?php
$conn = mysqli_connect('localhost','root','12345678','homework')
or die('Error connecting to MySql server');
$id = $_POST['id'];
$name = $_POST['name'];
$idCard = $_POST['idCard'];
$isFree = $_POST['isFree'];
$isHealth = $_POST['isHealth'];
if(!empty($id)){
$query = "SELECT * FROM sexworker WHERE id='$id'";
$result = mysqli_query($conn,$query);
}
if(!empty($name)){
$query = "SELECT * FROM sexworker WHERE name='$name'";
$result = mysqli_query($conn,$query);
}
if(!empty($idCard)){
$query = "SELECT * FROM sexworker WHERE idCard='$idCard'";
$result = mysqli_query($conn,$query);
}
if(!empty($isFree)){
$query = "SELECT * FROM sexworker WHERE isFree='$isFree'";
$result = mysqli_query($conn,$query);
}
if(!empty($isHealth)){
$query = "SELECT * FROM sexworker WHERE isHealth='$isHealth'";
$result = mysqli_query($conn,$query);
}
while($row = mysqli_fetch_array($result)){
echo '<input id="check" type="checkbox" value="'.$row['id'].'" name="todelete[]"/>';
echo '<input disabled="disabled" type="text" value="'.$row['id'].'"/>';
echo '<input id="name" disabled="disabled" type="text" value="'.$row['name'].'"/>';
echo '<input disabled="disabled" id="idCard" type="text" value="'.$row['idCard'].'"/>';
echo '<input disabled="disabled" type="text" value="'.$row['isFree'].'"/>';
echo '<input disabled="disabled" type="text" value="'.$row['isHealth'].'"/>';
echo '<br/>';
}
mysqli_close($conn);
?>