I am unable to style the table in css even though i have insert style for the tables.
<style>
table, th, td
{
border: 1px solid black;
}
</style>
The above is a simple style for the codes
<div class="container">
<table class="u-full-width">
<?php
$result=mysqli_query($connection,"SELECT * FROM register");
}
else
{
$result=mysqli_query($connection,"SELECT * FROM Persons WHERE username LIKE '".$Search."%'");
}
echo "<table border='1'>
<tr>
<th>username</th>
<th>password</th>
<th>Name</th>
<th>gender</th>
<th>age</th>
<th>Contact</th>
<th>address</th>
<th>email</th>
<th>occupation</th>
</tr>";
while($row=mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Username'] . "</td>";
echo "<td>" . $row['password'] . "</td>";
echo "<td>" . $row['Name'] . "</td> ";
echo "<td>" . $row['gender'] . "</td>";
echo "<td>" . $row['age'] . "</td> ";
echo "<td>" . $row['contact'] . "</td>";
echo "<td>" . $row['address'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['occupation'] . "</td>";
echo "</tr>";
}
echo"</table>";
mysqli_close($connection);
?>
</div>
</table>
The above is for displaying the tables. May i know what i can do so that it displays the table with the css. Thanks.