اول ما ارسل البيانات للقاعدة البيانات تجيني ذي الرساله: Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 in C:\xampp\htdocs\buy.php:18 Stack trace: #0 C:\xampp\htdocs\buy.php(18): mysqli_query(Object(mysqli), 'INSERT INTO `or...') #1 {main} thrown in C:\xampp\htdocs\buy.php on line 18.
الكود حق قاعدة البيانات:
<?php
$conn = mysqli_connect('localhost','root','','loin team_db');
if(isset($_POST['send'])){
$name = $_POST['name'];
$email = $_POST['email'];
$number = $_POST['number'];
$plan =$_POST['plan'];
$file = $_POST['file'];
$notes = $_POST['notes'];
$insert = "INSERT INTO `order_form`(`name`, `email`, `number`, `plan`, `file`, `notes`) VALUES ('name','email','number','file','notes',)";
mysqli_query($conn, $insert);
header('location:buy.php');
}
التعليقات