Connecting Tech Pros Worldwide Help | Site Map

how to refresh the screen

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 02:15 PM
windandwaves
Guest
 
Posts: n/a
Default how to refresh the screen

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, 02:15 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
Default 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, 02:15 PM
f700b
Guest
 
Posts: n/a
Default 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, 04:35 PM
Jim Hoagland
Guest
 
Posts: n/a
Default 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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.