Good day.

```
<input type="text" name="title">
<input type="text" name="name[]">
<input type="text" name="name[]">

<?php
if(isset($_POST['submit']){
    $title = $_POST['title'];
    $name = $_POST['name'];

    $add = "INSERT INTO books (title, name) VALUES ('$title','$name')";
}
?>

```

How can this code work? It should be inserted with same title and different names at the same time. Thank you.

[Sample Form](https://i.stack.imgur.com/BzAyU.jpg)

I want the record to be updated as follows:

`---------------------------------`

`|--bookID--|--Title--|--Author--|`

`|----1-----|---one---|----me----|`

`|----2-----|---two---|---you----|`

`---------------------------------`