please this is my search function
public function search($email) { $posting = $this->postModel->searchBooking($email); if($_SERVER['REQUEST_METHOD'] == 'POST'){ $posting = $this->postModel->searchBooking($email); $data = [ ]; $this->view('posts/search', $data); } }
and this is the function for the database
public function searchBooking($email){ $this->db->query('SELECT * FROM bookings WHERE email = :email'); $this->db->bind(':email', $email); $row = $this->db->Single(); return $row; }
1.4m articles
1.4m replys
5 comments
57.0k users