objectadd.php 372 B

12345678910111213
  1. <?php
  2. include "auth.php";
  3. if (isset($_POST['namemachine']))
  4. {
  5. $namemachine = htmlentities(mysqli_real_escape_string($link, $_POST['namemachine']));
  6. $query = "INSERT INTO object_field VALUES (NULL,'$namemachine')";
  7. $result = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
  8. echo "Объект добавлен";
  9. }