Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $servidor = "localhost";
- $usuario = "root";
- $senha = "";
- $dbname = "sistema";
- //Criar a conexao
- error_reporting(0);
- $link = new mysqli ("localhost", "root", "", "sistema");
- if($link->connect_errno){
- echo"Nossas falhas local experiência ..";
- exit();
- }
- ?>
- <?php
- if($_SERVER['REQUEST_METHOD'] == 'POST') {
- $mesa=$_POST['mesa'];
- $nome=$_POST['nome'];
- $telefone=$_POST['telefone'];
- $data=$_POST['data'];
- $hora=$_POST['hora'];
- $sql="INSERT INTO reservar(mesa,nome,telefone,data,hora) VALUES('$mesa','$nome','$telefone','$data','$hora')";
- $resultado_cadastro = mysqli_query($link,$sql);
- }
- ?>
- <form method="post" action="http://localhost/peixaria/inicio2.php?btn=entrega">
- <div class="reservations">
- <h1>Reservar:</h1>
- <p>Mesa: </p>
- <input type="text" name="mesa" class="form" required>
- <p>Nome: </p>
- <input type="text" name="nome" class="form" required>
- <p>Telefone: </p>
- <input type="text" name="telefone" class="form" required>
- <p>Data: </p>
- <input type="date" name="data" class="form" required placeholder="dd/mm/jjjj">
- <p>Hora: </p>
- <input type="time" name="hora" class="form" required placeholder="14:30">
- <button type="submit" >enviar</button>
- </div>
- <div class="thankyou">
- <i class="fa fa-check-square-o"></i>
- </div>
- <div id="dtBox"></div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement