connect_error) { die("Connection failed: " . $conn->connect_error); } ?> function s($v){return htmlspecialchars($v,ENT_QUOTES,'UTF-8');} if($_SERVER['REQUEST_METHOD']!=='POST'){header('Location: form.php');exit;} $fullname=$_POST['fullname']??''; $email=$_POST['email']??''; $birthdate=$_POST['birthdate']??''; $country=$_POST['country']??''; $gender=$_POST['gender']??''; $interests=$_POST['interests']??[]; $comments=$_POST['comments']??''; $errors=[]; if(!$fullname)$errors[]="Vārds obligāts"; if(!$email||!filter_var($email,FILTER_VALIDATE_EMAIL))$errors[]="Nepareizs e-pasts"; if(!$birthdate)$errors[]="Datums obligāts"; if(!$country)$errors[]="Valsts obligāta"; if(!$gender)$errors[]="Dzimums obligāts"; ?> Rezultāts

Rezultāts

Atpakaļ Atpakaļ