Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post

    continually refreshing a PHP page without reloading the page?

    Is it possible for a php page to continue refreshing the content without actually reloading the whole page?

    i.e. i have a table in MySQL that is continually being updated. A php page messages.php connects to the database and then displays the messages within the table, then it checks the database again and displays the messages and then checks the database again.....etc....etc. without using the meta tags or javascript to reload the page.

    Does anyone have anyideas? I thought of trying to use a loop function to continually loop through the connect, write, disconnect part, but this didn't work (but that may be because my code was wrong)

    Many thanks in advance,
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could use a framepage or an iframe and only load a part of the page.
    But the reload needs to be initialised clientsided (using javascript or metatags)

    Within an http protocol, you can not push content to the client, the client can only pull it in from the server. So you'd need to mix in some other protocol to be able to push it.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Thanks for the reply.

    I'm already using frames to do what you've just said, but the problem is that it appears to blink everytime that the javascript function is called to refresh the page, I was just trying to get around the problem of it blinking.

    Thanks,
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #4
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Omnis mico antequam dominus Spookster!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •