Insert Checkbox values into different rows in a table

I am trying to insert checkbox values form a form into different rows in a table using this php code but it seems not to be working

PHP:

<?php

$con=mysqli_connect("localhost","wilson_3","qwerty123","wilson_3");

 

// Check connection

if (mysqli_connect_errno())

 

  {

  echo "Failed to connect to MySQL: " . mysqli_connect_error();

 

  }

 

$values = $_POST[‘form’][‘AnyAssociatedSymptoms’];

 

foreach($values as $value)

{

  $sql = sprintf("INSERT INTO…

Insert Checkbox values into different rows in a table

See original post by wilyjose

Leave a Reply