In below code,i am selecting 4 checkboxes and i am able to display those 4 selected checkboxes.But how to store those 4 selected checkbox values in different columns under lecture1,lecture2 and so on in same table of my database.4 is default value for checkbox of lectures.
$teachername1=$_POST[ 'teachername1' ];
echo"$teachername1";
$_SESSION['teachername1']=$_POST[ 'teachername1' ];
if(!empty($_POST['lecture']))
{
$checked_count = count($_POST['lecture']);
echo"You have selected following ".$checked_count."option(s):<br/>";
foreach($_POST['lecture'] as $selected)
{
echo $selected."<br>";
}
}
Aucun commentaire:
Enregistrer un commentaire