Adding elements to a Web page without reloading

0

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

I have the whole system ready only in PHP, but the new registration does not appear 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.

    
asked by anonymous 07.03.2016 / 00:37

1 answer

1

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

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

    
08.03.2016 / 01:05