Results 1 to 5 of 5

Thread: Force a page refresh

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    259

    Force a page refresh

    i have an issue where when i run reports then add another record then run the same report it has the data of the first report until i click the refresh button on IE 8. this doesnt seem to be an issue with firefox 5. my question is what is the best way to force a refresh at the beginning of my report php page that is compatiable with all browsers? a php solution would be best, but im open to any suggestions. thanks

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Force a page refresh

    You can use the header location function. Although, If it is refreshing the same page, you will need a way to confirm it refreshed already, so it doesnt do an infinite refresh.

    PHP Code:
    header("Location: page.php"); 
    Keep in mind that header() must be called before anything is outputted.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    259

    Re: Force a page refresh

    I tried something like that but it just kept reloading

  4. #4
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: Force a page refresh

    You could pass a parameter and then check to see if the parameter is set. If it's set you know the page has loaded via a refresh.
    PHP Code:
    header("Location: page.php?s=true"); 

  5. #5
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: Force a page refresh

    This thread had an identical question. The solution in that thread was the same as lintz's however it was also suggested to use a meta refresh in HTML if the refresh doesn't have to occur in PHP.

    http://www.vbforums.com/showthread.php?t=656311

Posting Permissions

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



Click Here to Expand Forum to Full Width