here is my code the part of the option in php is not working somehow and it will only print team and question only when i tested
<?php
Include("conifdata.php");
$command= "INSERT INTO SoccerPoll (Team, Question, Player1, Player2, Player3, Player4) VALUES (?,?,?,?,?,?)";
$stmt = $dbh ->prepare($command);
$stmt->execute(array($_POST['team'], $_POST['question'],$_POST['option[0]'], $_POST['option[1]'], $_POST['option[2]'], $_POST['option[3]']));
if($stmt ->rowCount()>0){
echo "Successfull";
}
// when tested here it will only print team and question only i need all of them
echo $_POST["team"], $_POST['question'], $_POST['option[0]'], $_POST['option[1]'], $_POST['option[2]'], $_POST['option[3]'];
//and here is my html page
<h1>Create a Team Poll</h1>
<p>enter data.</p>
<form action="addPoll.php" method="POST">
Team: <input type="text" required name="team"><br>
Question: <input type="text" required name="question"><br>
Option 1: <input type="text" required name="option1"><br>
Option 2: <input type="text" required name="option2"><br>
Option 3: <input type="text" required name="option[]"><br>
Option 4: <input type="text" required name="option[]"><br>
<input type="submit" value="Create Poll">
</form>