Answer the question
In order to leave comments, you need to log in
Why is it not inserting data into MYSQL?
I don't know why, but he doesn't want to insert data from the form:
<?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 "ененененеенне";
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question