So it's actually hard to explain what I mean.
So I have this list here. Its pulls data from the db and then displays it in a DIV on my webpage.
I want it to only show the first 4 listing. Then after 4 seconds. I want it to show the next 4 listening and keep revolving like that infinitely. If someone could point me in the direction to be able to do that. Also, It needs to be updating dynamically every 4 seconds. Not when the user hits refresh.
<?php session_start(); ?>
<head>
<link rel="stylesheet" type="text/css" href="tablecss.css">
<style type="text/css">
.extra {
position: relative;
top: 50px;
}
body {
overflow: hidden;
}
</style>
</head>
<body>
<?php
$con = mysqli_connect('##', '##', '##', '##');
if(mysqli_connect_errno()) {
echo 'Failed to Connect to MySQL' . mysqli_connect_errno();
}
$user = $_SESSION['username'];
$result = mysqli_query($con, "SELECT * FROM corporations");
echo "<table id='tb'border='1'>
<tr>
<th>Name</th>
<th>Owner</th>
<th>Last Price</th>
<th>Volume</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['name']. "</td>";
echo "<br>";
echo "<td>" . $row['owner'] . "</td>";
echo "<br>";
echo "<td>" .'$'. $row['shareValue'] . "</td>";
echo "<br>";
echo "<td>" . $row['publicShares'] . "</td>";
echo "<br>";
}
mysqli_close($con);
?>
</div>
</body>