Okay now i have 2 input field on checkbox and one more is input text like this
<input type="text" name="student[]">
<input type="checkbox" name="marks[]">
Now i want to insert the all data in the database.How to insert simultaneously.
this is the example of php want but only one array
foreach($student as $value){
$sql = "INSERT INTO `academic` ('student', `mark`) VALUES ('$value','mark')";
if(mysqli_query($conn, $sql)){
echo "Insert mark for student ".$value." complete<br>";
} else {
echo "Error: " . mysqli_error($conn);
}
}
how to make it can insert 2 different array simultaneously?