Error:
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
is there any better way ?
$insertSQL = sprintf("INSERT INTO booking (book_id,book_start_rent,book_end_rent,book_total,staff_id) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['book_id'], "text"),
                       GetSQLValueString($_POST['book_start_rent'], "date"),
                       GetSQLValueString($_POST['book_end_rent'], "date"),
                       GetSQLValueString($_POST['book_total'], "double"),
                       GetSQLValueString($_POST["state2"], "text")
                       /"INSERT INTO car_booking (car_id, book_id) VALUES (%s, %s)",
                                            GetSQLValueString($_POST['state'], "text"),
                                            GetSQLValueString($_POST['book_id'], "text")
                          /"INSERT INTO member_booking (mem_id, book_id) VALUES (%s, %s)",
                              GetSQLValueString($colname_information2, "text"),
                              GetSQLValueString($_POST['book_id'], "text")
                            );
edit: I tried to put semicolon ; at the end of insert, got an error syntax error, unexpected ';'
$insertSQL = sprintf("INSERT INTO booking (book_id,book_start_rent,book_end_rent,book_total,staff_id) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['book_id'], "text"),
                       GetSQLValueString($_POST['book_start_rent'], "text"),
                       GetSQLValueString($_POST['book_end_rent'], "text"),
                       GetSQLValueString($_POST['book_total'], "double"),
                       GetSQLValueString($_POST["state2"], "text");
                       "INSERT INTO car_booking (car_id, book_id) VALUES (%s, %s)",
                                            GetSQLValueString($_POST['state'], "text"),
                                            GetSQLValueString($_POST['book_id'], "text");
                          "INSERT INTO member_booking (mem_id, book_id) VALUES (%s, %s)",
                              GetSQLValueString($colname_information2, "text"),
                              GetSQLValueString($_POST['book_id'], "text");
                            );
edit 2: I finally can insert, but there is new error which is
Cannot add or update a child row: a foreign key constraint fails (
car rental booking.member_booking, CONSTRAINTFK__memberFOREIGN KEY (mem_id) REFERENCESmember(mem_id) ON DELETE CASCADE ON UPDATE CASCADE)
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
                              $insertSQL = sprintf("INSERT INTO booking (book_id,book_start_rent,book_end_rent,book_total,staff_id) VALUES (%s, %s, %s, %s, %s)",
                                                   GetSQLValueString($_POST['book_id'], "text"),
                                                   GetSQLValueString($_POST['book_start_rent'], "text"),
                                                   GetSQLValueString($_POST['book_end_rent'], "text"),
                                                   GetSQLValueString($_POST['book_total'], "double"),
                                                   GetSQLValueString($_POST["state2"], "text"));
                $insertSQL2 = sprintf("INSERT INTO car_booking (car_id, book_id) VALUES (%s, %s)",
                                     GetSQLValueString($_POST['state'], "text"),
                                     GetSQLValueString($_POST['book_id'], "text")  );
                                     $insertSQL3 = sprintf("INSERT INTO member_booking (mem_id, book_id) VALUES (%s, %s)",
                                         GetSQLValueString($colname_information2, "text"),
                                         GetSQLValueString($_POST['book_id'], "text")  );
 
     
    