Question: Hello, I need help with this page code so when I enter some keywords in the search field placeholder=Search by Name/Domain it hits the DB

Hello,

I need help with this page code so when I enter some keywords in the search field placeholder="Search by Name/Domain"

it hits the DB table name tblevents and displays the results accordingly, it is okay to display it in the same page or redirect to a new one.

session_start();

error_reporting(0);

include('includes/config.php');

?>

All Available Certificates

  1. Home
  2. All Certificates

Recently Added Certificates

// Fetching Certs

$isactive=1;

$sql = "SELECT EventName,EventLocation,EventStartDate,EventEndDate,EventImage,id from tblevents where IsActive=:isactive order by id desc ";

$query = $dbh -> prepare($sql);

$query->bindParam(':isactive',$isactive,PDO::PARAM_STR);

$query->execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query->rowCount() > 0)

{

foreach($results as $row)

{

?>

EventStartDate);?>To

EventEndDate);?>

EventName);?>

Location : EventLocation);?>

id);?>" class="btn-def bnt-2 small">View Details

No Record Found


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!