Update information in real time javascript

Asked

Viewed 1,147 times

1

I would like to know some way to update information on a given page, ie if I modify some file, update in real time without having to refresh the page with javascript.

We assume that I change information in a one-page file, the page changes automatically without refreshing or updating.

Thank you

  • Good afternoon, it is not duplicated, because my case, is if I change one thing in the database the page will also change.

  • Good afternoon, Gonçalo the solution is ajax, regardless of having database or not, believe me, so you just make your php connect in the database, but the update is via ajax. If you don’t know how to use php+mysql, then the question is another. The ajax is on the front end and the database is on the backend. ajax is php front-end, php is ajax back-end, php is database front-end (mysql for example) and mysql is php backend (nowadays the terms are heavily used to define html+css+js as front-end and php+mysql as backend, however mysql is usually in a deeper layer).

  • ...Anyway, I don’t know if the terms I mentioned here are correct, but I believe this is it, so your question is either update the page or learn to use mysql (or postgresql) with php.

  • Good Afternoon, I know how to use php + mysql yet I have very low knowledge of ajax, hence my doubt.

  • 1

    So the problem is with ajax and I believe you have understood that ajax will not affect mysql, which will work mysql is php, so your problem is just how to use ajax, the only thing that ajax does is a request without needing page and saves the answer in a javascript variable, I believe the other question helps you. If it is not already clear from it, try these: http://answall.com/questions/20779/selectr-uma-tabela-mysql-dentro-de-um-arquivo-php-sem-refresh and http://answall.com/questions/4450/navigation-sem-refresh

No answers

Browser other questions tagged

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