query("SELECT * FROM clinix WHERE status=1 LIMIT 1"); } else { $slug = $conn->real_escape_string($slug); $res = $conn->query("SELECT * FROM clinix WHERE website_slug='$slug' AND status=1 LIMIT 1"); } // ================= FETCH DATA ================= if ($res && $res->num_rows > 0) { $row = $res->fetch_assoc(); // assign variables $clinic_name = $row['clinic_name']; $website_slug = $row['website_slug']; $address = $row['address']; $services = $row['services']; $timings = $row['timings']; $phones = $row['phones']; $staff = $row['staff']; $welcome_text = $row['welcome_text']; $short_intro = $row['short_intro']; $whatsapp = $row['whatsapp']; $facebook_link = $row['facebook_link']; $instagram_link = $row['instagram_link']; $youtube_link = $row['youtube_link']; $google_map_link = $row['google_map_link']; $cover_image = $row['cover_image']; $profile_image = $row['profile_image']; $satisfd_patient = $row['satisfd_patient']; $theme_code = $row['theme_code']; $status = $row['status']; } else { echo "No clinic found!"; exit; } ?>