How To Insert data to database from multiple select list using PHP an MySQL
问题 I have a form with many multiple select lists. There are several multiple select lists(blocks) in the form. How can I submit the multiple select data to the database? I have tried to create a foreach statement but the problem is it only submits one option in the database. <?php $db = mysqli_connect('localhost','root','','trial') or die($db); if (isset($_POST['submit'])) { $marks = mysqli_real_escape_string($db,$_POST['marks']); $subjects= $_POST['subject']; $farming= $_POST['farming'];