Horje
php refresh page Code Example
php refresh
//refreshes your current page
header("Refresh:0");

//refreshes your current page after 5 seconds
header("Refresh:5");

//If you need to redirect it to another page
header("Refresh:0; url=page2.php");
php header refresh
//Refreshes your current page
header("Refresh:0");
header("Refresh:2"); // Refreshes after 2 seconds

//If you need to redirect it to another page
header("Refresh:0; url=page2.php");
php refresh page
header("Refresh:0");
header refresh page php
header("Refresh:0");


header("Refresh:0; url=page2.php");
php refresh page without reloading
window.addEventListener('load', function()
{
    var xhr = null;

    getXmlHttpRequestObject = function()
    {
        if(!xhr)
        {               
            // Create a new XMLHttpRequest object 
            xhr = new XMLHttpRequest();
        }
        return xhr;
    };

    updateLiveData = function()
    {
        var now = new Date();
        // Date string is appended as a query with live data 
        // for not to use the cached version 
        var url = 'livefeed.txt?' + now.getTime();
        xhr = getXmlHttpRequestObject();
        xhr.onreadystatechange = evenHandler;
        // asynchronous requests
        xhr.open("GET", url, true);
        // Send the request over the network
        xhr.send(null);
    };

    updateLiveData();

    function evenHandler()
    {
        // Check response is ready or not
        if(xhr.readyState == 4 && xhr.status == 200)
        {
            dataDiv = document.getElementById('liveData');
            // Set current data text
            dataDiv.innerHTML = xhr.responseText;
            // Update the live data every 1 sec
            setTimeout(updateLiveData(), 1000);
        }
    }
});




Php

Related
reload page in php Code Example reload page in php Code Example
save html form data to text file using php Code Example save html form data to text file using php Code Example
php create file html Code Example php create file html Code Example
php exception message Code Example php exception message Code Example
how tdo you convert a stringto lowercase in php Code Example how tdo you convert a stringto lowercase in php Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9