How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call?How do

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charles Soto

    How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call? How do I force a refresh after a header() call?How do

    I've got a main loop script that calls two other scripts that do no
    user interaction. All they do is send a couple of mysql update
    statements. Then they use header() to call the main loop again. This
    works fine, EXCEPT the mysql statement isn't finished by the time the
    main loop is called. This is a problem because the main loop actually
    queries that same table to show the value of the rows you just
    changed. If I refresh the page manually, the new value is correctly
    displayed.

    I need to either be able to refresh the page upon calling it, or
    better yet, have a conditional statement in the subroutines that wait
    for the mysql statement to complete (how do you do that?).

    Any help is appreciated.

    Charles
  • steven mestdagh

    #2
    Re: How do I force a refresh after a header() call?

    Charles Soto <charles@gtemai l.net> wrote:[color=blue]
    > I've got a main loop script that calls two other scripts that do no
    > user interaction. All they do is send a couple of mysql update
    > statements. Then they use header() to call the main loop again. This
    > works fine, EXCEPT the mysql statement isn't finished by the time the
    > main loop is called. This is a problem because the main loop actually
    > queries that same table to show the value of the rows you just
    > changed. If I refresh the page manually, the new value is correctly
    > displayed.
    >
    > I need to either be able to refresh the page upon calling it, or
    > better yet, have a conditional statement in the subroutines that wait
    > for the mysql statement to complete (how do you do that?).[/color]

    could you not just put the mysql statements in a function, then call that
    function from your "main loop" (some code could clarify your problem)? if
    desired, put the function in a separate file and include the file before
    calling the function. your main loop will then wait for the function to
    finish up, and carry on if it's finished.

    regards,
    steven.

    Comment

    Working...