Hey guys,
Does anyone knows how to run a php script without reloading the entire page again and again?
For example the layout of my page is something like this:
**************************************
* Header(menu, images, etc)
*
* phpscript
* {
* echo rand(0,10);
* }
*
* footer(images, text, etc)
*
************************************
So when i click on button(in the page) the page reloads and a random number apears, but every time i reload the page i want only the php script to be executed and the header and footer not to be reloaded again!!
Any ideas(thnxs in advance)?
Run php code without refresh page
Moderator: General Moderators
Re: Run php code without refresh page
That's exactly what "AJAX" does. It is Javascript that calls a PHP script that returns data without an HTML header, allowing the Javascript to wait for the data to arrive, then do whatever is desired, without reloading the page. Just google AJAX and PHP.