I have a html form:
<form action="/startCode" method="post">
<input name="id" />
<input type="submit" />
</form>
It call function in Controller (Laravel framework):
function startCode(Request $request) {
$ID = $request->id;
$leng = 2000;
for ($i = 0; $i < $leng; $i++) {
// this code insert new record to DB, or edit record which was existed,
// it take some seconds, then with $leng = 2000 or more, it take very long times.
}
}
In html, is there a way to make they see the progress of the server side to make sure they are still working?
By the way, there is any way to insert new large number record? instead of each loop.