-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathresults.php
More file actions
executable file
·36 lines (28 loc) · 853 Bytes
/
results.php
File metadata and controls
executable file
·36 lines (28 loc) · 853 Bytes
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
<?php
$key = strval($_GET['key']);
$fields = strval($_GET['fields']);
//DO NOT EDIT
include('db.php');
if($fields == "all fields"){
$mydata = $mysqli->query("SELECT * FROM `project` WHERE name_of_project LIKE '%".$key."%' OR description LIKE '%".$key."%' OR looking_at LIKE '%".$key."%' ORDER BY datetime DESC;");
}
else{
$mydata = $mysqli->query("SELECT * FROM `project` WHERE looking_at LIKE '%".$key."%' ORDER BY datetime DESC;");
}
$num_row = $mydata->num_rows;
?>
<?php
//FIXME: EDIT THE STYLE OF THIS
for($i = 0; $i < $num_row; $i++){
$row = $mydata->fetch_assoc();
echo "Name of project:";
echo $row['name_of_project'];
echo "<br>Description: ";
echo $row['description'];
echo "<br>Looking for: ";
echo $row['looking_at'];
echo "<br>Username:";
echo $row['username'];
echo "<br><br>";
}
?>