242 lines
6.8 KiB
PHP
Executable File
242 lines
6.8 KiB
PHP
Executable File
<!DOCTYPE html>
|
|
|
|
<html lang="it">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport"
|
|
content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Delivery - Registrazione</title>
|
|
|
|
<link rel="stylesheet" href="css/bootstrap.min.css">
|
|
|
|
</head>
|
|
|
|
|
|
<body class="bg-light">
|
|
|
|
|
|
<div class="container mt-5">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h2 class="mb-4">
|
|
Registrazione
|
|
</h2>
|
|
|
|
|
|
<div class="card p-4 shadow-sm">
|
|
|
|
|
|
<form
|
|
action="register_action.php"
|
|
method="post"
|
|
>
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label
|
|
class="form-label"
|
|
for="nome"
|
|
>
|
|
Nome
|
|
</label>
|
|
|
|
<input
|
|
class="form-control"
|
|
type="text"
|
|
id="nome"
|
|
name="nome"
|
|
required
|
|
>
|
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
|
|
<label
|
|
class="form-label"
|
|
for="cognome"
|
|
>
|
|
Cognome
|
|
</label>
|
|
|
|
<input
|
|
class="form-control"
|
|
type="text"
|
|
id="cognome"
|
|
name="cognome"
|
|
required
|
|
>
|
|
|
|
</div>
|
|
|
|
<h5 class="mt-4">Indirizzo di consegna</h5>
|
|
<p class="text-muted small">La specifica richiede almeno un indirizzo per ogni cliente.</p>
|
|
|
|
<div class="row">
|
|
<div class="col-md-8 mb-3">
|
|
<label class="form-label" for="via">Via</label>
|
|
<input class="form-control" type="text" id="via" name="via" required>
|
|
</div>
|
|
<div class="col-md-4 mb-3">
|
|
<label class="form-label" for="numeroCivico">Numero civico</label>
|
|
<input class="form-control" type="text" id="numeroCivico" name="numeroCivico" required>
|
|
</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label" for="idComune">Comune</label>
|
|
<select class="form-select" id="idComune" name="idComune" required>
|
|
<option value="">
|
|
Seleziona un comune
|
|
</option>
|
|
|
|
<?php
|
|
|
|
require_once __DIR__ . "/config/database.php";
|
|
|
|
$stmt = $pdo->prepare("
|
|
SELECT
|
|
comune.idComune,
|
|
comune.nome AS nomeComune,
|
|
provincia.nome AS nomeProvincia,
|
|
provincia.sigla
|
|
|
|
FROM comune JOIN provincia ON comune.idProvincia = provincia.idProvincia
|
|
");
|
|
|
|
$stmt->execute();
|
|
|
|
$comuni = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
?>
|
|
|
|
<?php foreach ($comuni as $comune):?>
|
|
<option value="<?= $comune["idComune"] ?>">
|
|
<?=
|
|
htmlspecialchars($comune["nomeComune"] . " - " . $comune["nomeProvincia"] . " - " . $comune["sigla"])
|
|
?>
|
|
</option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label
|
|
class="form-label"
|
|
for="email"
|
|
>
|
|
Email
|
|
</label>
|
|
|
|
<input
|
|
class="form-control"
|
|
type="email"
|
|
id="email"
|
|
name="email"
|
|
required
|
|
>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label
|
|
class="form-label"
|
|
for="telefono"
|
|
>
|
|
Telefono
|
|
</label>
|
|
|
|
<input
|
|
class="form-control"
|
|
type="tel"
|
|
id="telefono"
|
|
name="telefono"
|
|
required
|
|
>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label
|
|
class="form-label"
|
|
for="password"
|
|
>
|
|
Password
|
|
</label>
|
|
|
|
<input
|
|
class="form-control"
|
|
type="password"
|
|
id="password"
|
|
name="password"
|
|
required
|
|
>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<label
|
|
class="form-label"
|
|
for="confermaPassword"
|
|
>
|
|
Conferma password
|
|
</label>
|
|
|
|
<input
|
|
class="form-control"
|
|
type="password"
|
|
id="confermaPassword"
|
|
name="confermaPassword"
|
|
required
|
|
>
|
|
|
|
</div>
|
|
|
|
|
|
<button
|
|
class="btn btn-primary w-100"
|
|
type="submit"
|
|
>
|
|
Registrati
|
|
</button>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
<div class="text-center mt-3">
|
|
|
|
<a href="index.php">
|
|
Torna al login
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|