if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Assuming text is shared
$sharedText = $_POST['text'] ?? '';
// Do something with the shared data, like saving to a database or displaying it
if ($sharedText) {
echo "You shared: " . htmlspecialchars($sharedText);
} else {
echo "No data shared.";
}
} else {
echo "Invalid request method.";
}