<!--<?php
if(isset($_POST['submit']))
    {
      require 'connect.php';
      $username = mysqli_real_escape_string($dbc, trim($_POST["username"]));
      $email = mysqli_real_escape_string($dbc, trim($_POST["email"]));
      $message = mysqli_real_escape_string($dbc, trim($_POST["message"]));       
      if(!empty($email) && !empty($username) && !empty($message)){
            $query ="INSERT INTO `message` (username, email, message) VALUES ('$username', '$email', '$message')";
            mysqli_query($dbc,$query) or die(mysqli_error($dbc));
            echo "<script>alert('Сіздің хабарламаңыз сәтті жөнелтілді!'); window.location.href='index.html';</script>";
            mysqli_close($dbc);
            exit();
          }
          else {
              echo "<script>alert('Барлық формаларды толтырыңыз!');</script>";
          }
}
?>-->
<body>
<div>
<form class="form" method="POST">
      <img src="images/icon_feedback.png"width="70px">
      <label>Сіздің аты-жөніңіз:</label>
      <input type="text" name="username">
      <label>Сіздің email мекен-жайыңыз:</label>
      <input type="email" name="email">
      <label>Сіздің хабарламаңыз:</label>
      <textarea name="message" rows="6"></textarea>
      <button type="submit" name="submit">ЖӨНЕЛТУ</button>
</div>
<style>
    h3{text-align: center;}
    .form{
      width: 400px;
      margin: auto;
      margin-top: 20px;
      background-color:  #fff;
      border-radius: 10px;
      box-shadow: 0px 0px 10px gray;
      padding: 20px;
    }
    .form>label{
      color: black;
      display: block;
      font-size: 20px;
      margin-bottom: 15px;
    }
    .form>input, .form>textarea{
      width: 100%;
      padding: 5px;
      margin-bottom: 15px;
    }
    .form>button{
      padding: 10px 30px;
      background-color: green;
      border: none;
      color: #fff;
      cursor: pointer;
      font-weight: 500;
      transition: .5s;
    }
    .form>button:hover{
      transition: .5s;
      transform: scale(1.1);
      box-shadow: 0px 0px 10px green;
    }
    .form>img{
      display: block;
      margin: auto;
      margin-bottom: 20px;
      margin-top: 20px; 
    }
</style>
</body>
</html>
