-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.php
More file actions
25 lines (17 loc) · 726 Bytes
/
Input.php
File metadata and controls
25 lines (17 loc) · 726 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
<?php
include "db_connect.php";
$keywordfromforum =$_GET["keyword"];
//echo $keywordfromforum; shows the keyword u are searching
// search for a word
echo "<h2>Show all sequences which are ".$keywordfromforum." : </h2>";
$sql = "SELECT identifier,Biomaterial_type,Sequences,Source FROM Biologicaldata WHERE Biomaterial_type LIKE '%".$keywordfromforum."%'";
$result = $mysqli->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "id: " . $row["identifier"]. " - Biomaterial type: " . $row["Biomaterial_type"]. " - Sequence: " . $row["Sequences"]. " - Source: " . $row["Source"]. "<br>";
}
} else {
echo "0 results";
}
?>