I have three tables in my database which are:
messages
topics
comments
Each of these tables has two fields called \'content\' and \'title\'
Html Search form:
Search.php:
link, $fm->validation($_GET['search']));
}
else{
header("Location:404.php");
}
?>
select($query);
if ($post) {
while ($result = $post->fetch_assoc()) {
echo"Database data like, $result['title']";
}
}
else{
echo "result Not found";
}
include database.php in search.php
class Database{
public function select($query){
$result = $this->link->query($query) or die($this->link->error.__LINE__);
if($result->num_rows > 0){
return $result;
}
else {
return false;
}
}
}
$db = new Database();