connect_error) { $result = $mysqli->query("SELECT usernotes FROM piwigo_user_infos WHERE user_id = $userId LIMIT 1"); if ($row = $result->fetch_assoc()) { if (preg_match('/Expires:\s*(\d{4}-\d{2}-\d{2})/', $row['usernotes'], $match)) { $expireDate = $match[1]; } } $mysqli->close(); } if ($expireDate) { $today = date('Y-m-d'); $isExpired = $today > $expireDate; ?>