Untitled
unknown
plain_text
2 years ago
799 B
3
Indexable
try {
//$_SERVER['REQUEST_METHOD'] = 'POST';
//$_POST = ['email' => 'dd', 'name' => ['first' => "first", 'last' => 'last']];
echo "<!-- snoball: before " . date('Y-m-d H:i:s') . "-->";
// Check if the request method is POST
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
echo "<!-- snoball: after " . date('Y-m-d H:i:s') . "-->";
// Retrieve the submitted data
$submitted_data = $_POST;
echo "<div id=\"snoball-share-container\" data-email=\"{$submitted_data['email']}\" data-first-name=\"{$submitted_data['name']['first']}\" data-last-name=\"{$submitted_data['name']['last']}\"></div>";
}
} catch (Exception $e) { // Handle any exceptions that may occur echo "Error processing the request: " . $e->getMessage(); error_log("Error processing the request: " . $e->getMessage()); }Editor is loading...
Leave a Comment