To save Multiple div values with the same name using php and mysql

How to save multipple div values with the content editable feature with the same name in database using php.

The user can click the div element as many times as he/she wants and can enter the values in the text boxes(that is a small div boxes). Once the user clicks the submit button, all the values that he/she entered should be saved in the database.

I have written code like this to display the box and was working fine.
$board.append(‘<div class=“class1” style=“left:20px;top:70px”><div contenteditable class=“editable” name = “content”></div></div>’);

and the next code with be with a different class outside but the same name inside.

$board.append(‘<div class=“class2” style=“left:20px;top:70px”><div contenteditable class=“editable” name = “content”></div></div>’);

The user can create as many div values as he/she wants.

How to call these values in array using php and save it in the database.

I was able to do the same with the text values with the name of the text box, but when i tried to do the same, i could not run it and was showing error.

I would be glad if somebody could help me out with code.

You’ll need to copy the values from the contenteditable divs into a form input (probably a textarea is best) before submitting the form.

Then, you can access them using the $_POST superglobal.