[text] ааа

Viewer

  1. <?php
  2.  
  3. require_once __DIR__ . '/incs/data.php';
  4. require_once __DIR__ . '/incs/functions.php';
  5.  
  6. if(!empty($_POST)){
  7.     debug($_POST);
  8.     $fields = load($fields);
  9.     debug($fields);
  10.     if($errors = validate($fields)){
  11.         debug($errors);
  12.     }else{
  13.         echo 'OK';
  14.         // mail
  15.     }
  16. }
  17.  
  18. ?>
  19. <!doctype html>
  20. <html lang="en">
  21. <head>
  22.     <meta charset="UTF-8">
  23.     <meta name="viewport"
  24.           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  25.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  26.     <title>Document</title>
  27.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  28. </head>
  29. <body>
  30.  
  31. <div class="container">
  32.     <div class="row">
  33.         <div class="col-md-6 offset-md-3">
  34.  
  35.             <form method="post">
  36.  
  37.                 <div class="form-group">
  38.                     <label for="name">Имя</label>
  39.                     <input type="text" class="form-control" id="name" name="name">
  40.                 </div>
  41.  
  42.                 <div class="form-group">
  43.                     <label for="email">Email</label>
  44.                     <input type="email" class="form-control" id="email" name="email">
  45.                 </div>
  46.  
  47.                 <div class="form-group">
  48.                     <label for="address">Адрес</label>
  49.                     <input type="text" class="form-control" id="address" name="address">
  50.                 </div>
  51.  
  52.                 <div class="form-group">
  53.                     <label for="phone">Телефон</label>
  54.                     <input type="text" class="form-control" id="phone" name="phone">
  55.                 </div>
  56.  
  57.                 <div class="form-group">
  58.                     <label for="comment">Комментарий</label>
  59.                     <textarea name="comment" id="comment" rows="3" class="form-control"></textarea>
  60.                 </div>
  61.  
  62.                 <div class="form-group form-check">
  63.                     <input name="agree" type="checkbox" class="form-check-input" id="agree">
  64.                     <label class="form-check-label" for="agree">Соглашаюсь с обработкой персональных данных</label>
  65.                 </div>
  66.  
  67.                 <button type="submit" class="btn btn-primary">Submit</button>
  68.             </form>
  69.  
  70.         </div>
  71.     </div>
  72. </div>
  73.  
  74. </body>
  75. </html>

Editor

You can edit this paste and save as new: