I am a newible on php and I am following a video to learn inserting data in website to database, but I face a huge problem.
As I am going to from many groups from many members, i create some checkboxs for member to register. I followed this video tutorial,but have error.
<?php
//$_SESSION['name'];
session_start();
echo "student";
?>
<form action="" method="POST">
<input type="checkbox" name="group[]" value="group1">group1<br>
<input type="checkbox" name="group[]" value="group2">group2<br>
<input type="checkbox" name="group[]" value="group3">group3<br>
<input type="checkbox" name="group[]" value="group4">group4<br>
<input type="checkbox" name="group[]" value="group5">group5<br>
<input type="submit" name="submit" value="submit">
</form>
<?php
if (isset($_POST['submit']))
{
//print_r($_POST);
echo implode(',', $POST['group']);
}
?>
</h1>
<a href="logout.php">Logout</a>
All things that I wanna do was followed for these coding but still have error
Warning: implode(): Invalid arguments passed in C:\xampp\htdocs\fyp\student.php on line 37
echo implode(',', $POST['group']);
what was wrong with it, thank you for any suggestion