我试图看看这有什么问题,它说它期待一个']',但我没有在 mySQL 中看到问题,这是它说它搞砸的那一行。
('$_POST[first_name]','$_POST[last_name]','$_POST[email]','$_POST[phone_number]','$_POST[event_name]','$_POST[event_category]','$_POST[event_ description]','$_POST[event_admission]','$_POST[event_amount]',$event_start_date,$event_end_date,'$_POST[event_location]','$_POST[event_family]')";
这是完整的代码:
$sql="INSERT INTO events_main (first_name, last_name, email, phone_number, event_name, event_category, event_description, event_admission, event_amount, event_start_date, event_end_date, event_location, event_family)VALUES('$_POST[first_name]','$_POST[last_name]','$_POST[email]','$_POST[phone_number]','$_POST[event_name]','$_POST[event_category]','$_POST[event_description]','$_POST[event_admission]','$_POST[event_amount]','$event_start_date','$event_end_date','$_POST[event_location]','$_POST[event_family]')";