<?php
session_start();
$connect = mysqli_connect('localhost','root','root','register');
if (!$connect) {
echo "Ошибка подключения к базе данных.";
}
session_start();
$title = $_POST['title'];
$img = $_POST['img'];
$file = $_POST['file'];
if (isset($_POST['addd'])) {
mysqli_query($connect, "INSERT INTO `modes` (`title`, `file`, `img`,) VALUES ('$title', '$file', '$img'");
} else {
echo "ененененеенне";
}
?>