my latest
This commit is contained in:
parent
0dc1ca6104
commit
f8e0cdfba4
13
register.php
13
register.php
@ -23,7 +23,18 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
// --- DATA CAPTURE ---
|
// --- DATA CAPTURE ---
|
||||||
// The $webinar object is already available from the initial page load.
|
$webinar_id = filter_input(INPUT_POST, 'webinar_id', FILTER_VALIDATE_INT);
|
||||||
|
$webinar = null;
|
||||||
|
if ($webinar_id) {
|
||||||
|
try {
|
||||||
|
$stmt = $pdo->prepare("SELECT title, description, starts_at, ends_at FROM webinars WHERE id = ?");
|
||||||
|
$stmt->execute([$webinar_id]);
|
||||||
|
$webinar = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
// Log error, but don't show to user
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
|
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
|
||||||
$first_name = filter_input(INPUT_POST, 'first_name', FILTER_SANITIZE_STRING);
|
$first_name = filter_input(INPUT_POST, 'first_name', FILTER_SANITIZE_STRING);
|
||||||
$last_name = filter_input(INPUT_POST, 'last_name', FILTER_SANITIZE_STRING);
|
$last_name = filter_input(INPUT_POST, 'last_name', FILTER_SANITIZE_STRING);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user