I have the below code and I’m looking to limit how large the box is and have it be able to scroll if the rows expand past that. I may be doing this wrong so any pointers is greatly appreciated! Right now, it pushes the page down well past the footer due to how many records are in the database…
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Current Vendors</h4>
<p class="category">Vendors listed as active within VendorBase.</p>
</div>
<?php
$con=mysqli_connect("localhost","root","test","vendors");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM vendor_data");
echo "<div class='content table-responsive table-full-width'>
<table class='table table-hover'>
<thead>
<th>Name</th>
<th>Type</th>
<th>Company</th>
<th>Email</th>
<th>SOC2 Report</th>
<th>Status</th>
</thead>
";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['type'] . "</td>";
echo "<td>" . $row['company'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['soc'] . "</td>";
echo "<td>" . $row['status'] . "</td>";
echo "</tr>";
}
echo "</table>";
echo "</div>";
mysqli_close($con);
?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>