Connecting Tech Pros Worldwide Help | Site Map

how to refresh the screen

  #1  
Old July 17th, 2005, 03:15 PM
windandwaves
Guest
 
Posts: n/a
Hi Folk

I have a PHP script like this:

<?php

echo "this may take some time";

.....lots of stuff

{reload new page with result}

?>

how do I get the page to refresh so that the user will see the message while
it is waiting for the process to continue?

TIA

- Nicolaas


  #2  
Old July 17th, 2005, 03:15 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a

re: how to refresh the screen


windandwaves wrote:[color=blue]
> Hi Folk
>
> I have a PHP script like this:
>
> <?php
>
> echo "this may take some time";
>
> ....lots of stuff
>
> {reload new page with result}[/color]

<snip>
1. meta refresh
2. header refresh (non-standard, but works in many browsers)

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com

  #3  
Old July 17th, 2005, 03:15 PM
f700b
Guest
 
Posts: n/a

re: how to refresh the screen




windandwaves ha escrito:[color=blue]
> Hi Folk
>
> I have a PHP script like this:
>
> <?php
>
> echo "this may take some time";
>
> ....lots of stuff
>
> {reload new page with result}
>
> ?>
>
> how do I get the page to refresh so that the user will see the message while
> it is waiting for the process to continue?
>
>[/color]

You can test with this function?
<?
function re-fresh ($time, $topage) {
//$time in sec
echo "<meta http-equiv=\"refresh\" content=\"{$time}; url={$topage}\"
/> ";
}


echo ' .... . tis may take sme timme';
re-fresh (10,"http://url/path/to/page");
?>

  #4  
Old July 17th, 2005, 05:35 PM
Jim Hoagland
Guest
 
Posts: n/a

re: how to refresh the screen


header("location url");exit: will not work after you use the echo statement
because this forces the headers to be sent. You will get an error message
"Headers already sent".

Also remember that a meta refresh must appear in the <head> section of your
html, so a function such as f700b's cannot be called from anywhere in your
PHP code.

ECRIA
http://www.ecria.com


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
curses won't refresh screen Casey Bralla answers 0 January 28th, 2006 03:45 PM
best way to refresh a dataset. jaYPee answers 10 November 21st, 2005 06:46 AM
how to refresh screen after delete a record J answers 2 November 18th, 2005 09:33 PM
How to refresh web page so it does not timeout after 20 mins with no activity Sandy answers 1 July 23rd, 2005 02:29 PM