0
Hello I made a small form and it only worked once , I didn’t change the code after that and it doesn’t work anymore what it could be ?
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
//Criar a conexao
$link = new mysqli ("localhost", "root", "", "peixaria");
if($link->connect_errno){
echo"Nossas falhas local experiência ..";
exit();
}
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$mesa = $_POST['mesa'];
$nome = $_POST['nome'];
$telefone = $_POST['telefone'];
$sql="INSERT INTO nreserva(mesa,nome,telefone) VALUES('$mesa','$nome','$telefone')";
$resultado_reserva = mysqli_query($link,$sql);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<title>Reserva</title>
<h1>Peixaria</h1>
<ul class="menu cf">
<li><a href="secao.php">Início</a></li>
<li><a href="pedidos.php">Pedidos</a></li>
<li><a href="reserva.php">Reserva</a></li>
<li><a href="relatorio.php">Relatório</a></li>
</ul>
<br>
<main>
<form method="post" action="reserva.php">
<header>
<h2>Reserva</h2>
</header>
<fieldset>
<label>
<span>Mesa:</span>
<input type="text" name="mesa"value="">
</label>
<label>
<span>Nome:</span>
<input type="text" name="nome" value="">
</label>
<label>
<span>Telefone:</span>
<input type="tel" name="telefone"value="">
</label>
</fieldset>
<br>
<button class="btn" type="submit">Fazer Reserva</button>
</form>
</main>
</body>