Good Morning Guys,
Automatically reload and displaying the content without reloading the page is very important in web application. Specially this technique is used in news or magazine website for latest news, organization website, banking site for notification etc. You can directly display content in your website from database and automatically change it after fixed interval of time. There are times when you need to refresh some part of your web page in a specific interval of time (I recommend three seconds).
This tutorial teaches you how to load contents from an external page or file into your current page and refreshes these contents every 3 seconds with the help of PHP and Jquery.
Let’s see how you can achieve this:
Main part of this tutorial is the jQuery code. This is very simple:
datas.php file is responsible for what data is to be displayed.
You can either fetch data from any file or database tables.
Code for datas.php
Secure Login page using PHP and MYSQL based on user role "; $i_2="
Code for index.php
Automatically Load Contents and Refresh Div using Jquery and Ajax Automatically refresh div using jQuery -PrittyTimes