$name = $_POST['name'];
$content = $_POST['content'];
$price = $_POST['price'];
$sale = $_POST['sale'];
$thumb = $_POST['Thumbnail'];
$smallContent = $_POST['smallContent'];
$stmt = mysqli_prepare($link, "INSERT INTO `orders` (`name`, `content`, `price`, `sale`, `image`, `smallContent`)
VALUES (?, ?, ?, ?, ?, ?)");
mysqli_stmt_bind_param($stmt, "ssssss", $name, $content, $price, $sale, $thumb, $smallContent);
mysqli_stmt_execute($stmt);
if (mysqli_affected_rows($link) > 0) {
echo "<h1 style='text-align: center'>Товар добавлен</h1>";
} else {
echo "<h1 style='text-align: center'>Ошибка добавления товара: " . mysqli_error($link) . "</h1>";
}