/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
ajax
/
notifications
/
up file
home
<?php include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $user_id = $_GET['user_id']; $stmt = $connection->prepare("SELECT * FROM tbl_notifications WHERE user_id = '$user_id' ORDER BY created_at DESC"); $stmt->bind_param("i", $user_id); $stmt->execute(); $result = $stmt->get_result(); $notifications = []; while ($row = $result->fetch_assoc()) { $notifications[] = $row; } echo json_encode($notifications); $stmt->close(); ?>