Add elements to a webpage without reloading

Asked

Viewed 44 times

0

I want to make a system to list records from a table in the database so that as soon as I add a new record, it automatically appears in the list.

I have the whole system ready only in PHP, but does not appear the new record automatically-- I have to refresh the page for it to be displayed.

Does anyone know how I can do this with Javascript? The knowledge I have in Javascript is pretty basic.

  • 2

    With ajax you can collect this information and adds it to it without reloading the page

1 answer

1


You can use the Javascript setInterval function, so from time to time an AJAX request is made that retrieves data from the database.

If you want something more instant, you can use React.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.