あなたはmysqliの
$connection = mysqli_connect(your database information);
//from the form create the main record insert statement into mysql
mysqli_query($connection,
"INSERT INTO yourtable
(fields)
VALUES
(values)
");
//get the id of that record you just inserted
$id = mysqli_insert_id($connection);
// get the images from the form
$images = $_POST['images'];
//this is assuming your images are sent as an array of images from the form, would be slightly different if there is only one.
foreach($images as $image){
mysqli_query($onnection,
"INSERT INTO images_table
(product_id, all other fields)
VALUES
($id, all other values)
"
);
}
を使用している場合、