I have a form and its action triggers the loading of data from a table. I want the action to return and display a loading gif while the query is still running.
php:
if(isset($_POST['button']))
{
echo '<div id="loading"></div>';
for($x=0; $x<10000; $x++)
{
$conn->query("SELECT * FROM table");
}
}
html:
My current code doesn't show the loading gif until the query has already run.