<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<title>Giornata Bionike - Farmacia Carnelli</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f2f5f4;
padding: 20px;
}
.container {
max-width: 540px;
margin: auto;
background: #fff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
border-top: 6px solid #2f6f6b;
}
h1,h2,p { text-align: center; }
label { display:block; margin-top:15px; font-weight:bold; }
input { width:100%; padding:8px; margin-top:5px; }
.orari { background:#f7faf9; padding:15px; margin-top:20px; }
button {
margin-top:25px;
width:100%;
padding:12px;
background:#2f6f6b;
color:#fff;
border:none;
border-radius:6px;
font-size:16px;
}
</style>
</head>
<body>
<div class="container">
<h1>GIORNATA BIONIKE 09/04/2026</h1>
<h2>Farmacia Carnelli ti regala una consulenza dermocosmetica</h2>
<p>Durata appuntamento: <strong>30 minuti</strong></p>
<form action="invia.php" method="post">
<label>Nome e Cognome *</label>
<input type="text" name="nome" required>
<label>Telefono *</label>
<input type="tel" name="telefono" required>
<label>Email (facoltativa)</label>
<input type="email" name="email">
<div class="orari">
<strong>Scegli fascia oraria *</strong><br>
<label><input type="radio" name="orario" value="10:00-10:30" required> 10:00 - 10:30</label>
<label><input type="radio" name="orario" value="10:30-11:00"> 10:30 - 11:00</label>
<label><input type="radio" name="orario" value="11:00-11:30"> 11:00 - 11:30</label>
<label><input type="radio" name="orario" value="15:30-16:00"> 15:30 - 16:00</label>
<label><input type="radio" name="orario" value="16:00-16:30"> 16:00 - 16:30</label>
<label><input type="radio" name="orario" value="16:30-17:00"> 16:30 - 17:00</label>
<label><input type="radio" name="orario" value="17:00-17:30"> 17:00 - 17:30</label>
</div>
<button type="submit">Prenota appuntamento</button>
</form>
<p style="font-size:12px;text-align:center;margin-top:20px;">
Dati trattati solo per la prenotazione (GDPR UE 2016/679)
</p>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$to = "Farmacia.carnelli@gmail.com";
$subject = "Nuova prenotazione - Giornata Bionike";
$nome = htmlspecialchars($_POST["Nome e Cognome"]);
$telefono = htmlspecialchars($_POST["Telefono"]);
$email = htmlspecialchars($_POST["Email"]);
$orario = htmlspecialchars($_POST["Orario"]);
$message = "NUOVA PRENOTAZIONE\n\n";
$message .= "Nome e Cognome: $nome\n";
$message .= "Telefono: $telefono\n";
$message .= "Email: $email\n";
$message .= "Orario scelto: $orario\n";
$headers = "From: prenotazioni@farmaciacarnelli.it\r\n";
$headers .= "Reply-To: $email\r\n";
mail($to, $subject, $message, $headers);
}
?>
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<title>Prenotazione inviata</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f5f4;
text-align: center;
padding: 40px;
}
.box {
background: #ffffff;
padding: 30px;
max-width: 400px;
margin: auto;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
h1 {
color: #2f6f6b;
}
</style>
</head>
<body>
<div class="box">
<h1>Grazie!</h1>
<p>La prenotazione è stata inviata correttamente.</p>
<p>Ti aspettiamo in farmacia 💚</p>
</div>
</body>
</html>