Document
include 'db.php';
$lesson = $_POST['lesson'];
$teacher = $_POST['teacher']; // Изменено на правильное имя поля
$sql = "INSERT INTO MONDAY (lesson, teacher) VALUES ('$lesson', '$teacher')";
if (mysqli_query($conn, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "
" . mysqli_error($conn);
}
mysqli_close($conn);
?>
Index.php:
register.php: