2222
This commit is contained in:
parent
d762bc8263
commit
b9f0c9ea5a
33
register.php
33
register.php
@ -10,8 +10,8 @@ $response = [];
|
||||
$webinar = null;
|
||||
if ($webinar_id) {
|
||||
try {
|
||||
// Fetch webinar details to create calendar links
|
||||
$stmt = $pdo->query("SELECT title, description, starts_at, ends_at FROM webinars ORDER BY starts_at ASC LIMIT 1");
|
||||
$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
|
||||
@ -24,6 +24,19 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
|
||||
// --- DATA CAPTURE ---
|
||||
$webinar_id = filter_input(INPUT_POST, 'webinar_id', FILTER_VALIDATE_INT);
|
||||
|
||||
// --- WEBINAR DETAILS ---
|
||||
$webinar = null;
|
||||
if ($webinar_id) {
|
||||
try {
|
||||
// Fetch webinar details to create calendar links
|
||||
$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);
|
||||
$first_name = filter_input(INPUT_POST, 'first_name', FILTER_SANITIZE_STRING);
|
||||
$last_name = filter_input(INPUT_POST, 'last_name', FILTER_SANITIZE_STRING);
|
||||
@ -178,8 +191,20 @@ if (!$webinar) {
|
||||
<p class="microcopy">We’ll send the join link & calendar invite.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="first_name">First name (optional)</label>
|
||||
<input type="text" id="first_name" name="first_name">
|
||||
<label for="first_name">First name</label>
|
||||
<input type="text" id="first_name" name="first_name" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="last_name">Last name</label>
|
||||
<input type="text" id="last_name" name="last_name" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="company">Company</label>
|
||||
<input type="text" id="company" name="company">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="how_did_you_hear">How did you hear about this webinar?</label>
|
||||
<input type="text" id="how_did_you_hear" name="how_did_you_hear">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user