How do I get all the results of my query to show? If my $author prints as Array ( [0] => 1 ) the query pulls correct data. However, if my $author prints as Array ( [0] => 1 [1] => 8 ) or any combination of values received from my form, then it returns empty.
The array prints correctly, so I am moving from that point forward and assuming the problem is the query but cannot figure it out.
$query = "SELECT * FROM estudos";
if (isset($author)){
$query.=" WHERE author='" . implode ($author) ."'";
print_r ($author);
}
Here is my php and html...
$results=$dbclient->query($query) or die(mysqli_error());
<?php
while($row=mysqli_fetch_array($results))
echo"<tr><td class='name'>$row[name]</td>";
?>