I'm trying to Hide the button if "name" is empty no error show but the button is still showing I tried adding css to it but the button still show
<table style="width:100%" border="1px">
<tr align="center">
<th>Name</th>
<th>Image</th>
<th>PDF</th>
<th>Grade</th>
<th>Date</th>
</tr>
<?php
foreach ($records as $value) {
$id = $row['id'];
echo '<tr align="center">';
echo "<td>" . $value['name'] . "</td>";
if ($value['name'] != ''){
echo "<td> <a class='design' style='display:none;' href='".$value['img_name']."'>Download image</a></td>";
}else{
echo "<td> <a class='design' href='".$value['img_name']."'>Download image</a></td>";
}
echo "<td><a class='cert' href='".$value['pdf_name']."' download>Download PDF</a></td>";
echo "<td>". $value['score']."</td>";
echo "<td>". $value['date']."</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>