check if valid email before executing
This commit is contained in:
parent
881e877760
commit
ac56383edf
14
submit.php
14
submit.php
|
|
@ -3,6 +3,20 @@ include 'zefixAPI.php';
|
||||||
|
|
||||||
$taskDir = 'tasks';
|
$taskDir = 'tasks';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* E-Mail aus dem Formular holen und serverseitig validieren
|
||||||
|
*/
|
||||||
|
$email = isset($_POST['email']) ? trim($_POST['email']) : '';
|
||||||
|
|
||||||
|
if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
echo "Bitte geben Sie eine gültige E-Mail-Adresse an.";
|
||||||
|
echo '<br><a href="index.php">Zurück zur Startseite</a>';
|
||||||
|
// WICHTIG: Script hier abbrechen, damit KEIN Task angelegt wird
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Request Types:
|
* Request Types:
|
||||||
* Count
|
* Count
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue