You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.7 KiB

  1. <?php
  2. session_start();
  3. header('Content-Type: text/html; charset=UTF-8');
  4. $db = include("config.php");
  5. $textt = "";
  6. if (isset($_POST["name"]) && isset($_POST["phone"])) {
  7. $query = "INSERT INTO cons(name, phone) VALUES ('" . $_POST["name"] . "', '" . $_POST["phone"] . "')";
  8. mysqli_query($db, $query);
  9. $textt = "Вы успешно отправили заявку!";
  10. }
  11. ?>
  12. <html>
  13. <head>
  14. <meta charset="utf-8">
  15. <meta name="viewport" content="width=device-width, initial-scale=1">
  16. <title>FutureBuilding Shop</title>
  17. <script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
  18. <script src="js/bootstrap.js"></script>
  19. <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
  20. <link rel="stylesheet" type="text/css" href="css/style.css">
  21. </head>
  22. <body>
  23. <nav class="navbar fixed-top navbar-light bg-light navbar-expand border">
  24. <a class="navbar-brand" href="index.php">FutureBuilding</a>
  25. <ul class="navbar-nav">
  26. <li class="nav-item dropdown">
  27. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  28. Меню
  29. </a>
  30. <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
  31. <a class="nav-link" href="shop.php">Каталог товаров</a>
  32. <a class="nav-link" href="projects.php">Наши проекты</a>
  33. <a class="nav-link" href="brigade.php">Строительная бригада</a>
  34. </div>
  35. </li>
  36. <li class="nav-item">
  37. <a class="nav-link" href="cart.php">Корзина</a>
  38. </li>
  39. </ul>
  40. </nav>
  41. <div class="container">
  42. <div class="row" style="text-align: center">
  43. <div class="col-12">
  44. <span><?php echo $textt ?></span>
  45. <div class="send">
  46. <h3>Оставьте заявку. Мы вам обязательно перезвоним!</h3>
  47. <form action="phone.php" method="post">
  48. <input type="text" required name="name" placeholder="Ваше Имя" /> <br>
  49. <input type="text" required name="phone" placeholder="Номер телефона" /> <br>
  50. <input class="btn btn-success" type="submit" value="Отправить заявку" />
  51. </form>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <footer class="page-footer font-small blue border">
  57. <div class="footer-copyright text-center py-3">
  58. ©FutureBuilding
  59. </div>
  60. </footer>
  61. </body>
  62. </html>