I want to show my mysql data without refresh page, click button, change etc. If anyone one submit data on mysql from anywhere then I can see the his/her submitted data without refresh, change, click. data come from me automatically. I know jquery, ajax, php but I don’t find any way solving this problem. If you have any idea, please, share with me. Thanks
Share
So you know jQuery, AJAX and PHP, but you don’t know how to change data? At least try to be creative…
First you need a PHP page that get’s the database data.
As you might notice, I like to transfer the data as JSON – hence the
header()andjson_encode()call.If you go to that page you’ll see the results from your database. Now you can call that file using jQuery AJAX. If you use an interval you can get the new data every x seconds.
Voila!
I can have huge discussions that programmers are creative. This is my point exactly. Knowing a language doesn’t make you a good developer. If it helps you, get a piece of paper and make a flow-graph or something.