Forum Moderators: coopster

Message Too Old, No Replies

Output Caching.

         

compose

12:49 pm on Oct 14, 2005 (gmt 0)

10+ Year Member



Hi,

I am facing a problem that user enter user name, password and clicks on login button. After clicking button i do Login authentication and load user profile and prefrences during this backgroud process i want to show "Please Wait. Loading..." message on screen but it is not showing this message it show this label after all procesing and when page is completely loaded.

One same problem like... We query the database suppose there are 100 lines we have to show all on same page then i want to show result as Google do as soon as it found result it show it on screen not as load complete page in one time.

What is this problem. May be i am not asking in technical language so sorry for that.

Vineet.

coopster

3:06 pm on Oct 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



PHP has a flush() [php.net] function that may be of use to you.

compose

6:07 am on Oct 15, 2005 (gmt 0)

10+ Year Member



Thanx,

Can u please describe it it detail.

coopster

12:12 am on Oct 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Only as good as that manual page could ;)

Think of it like this ... your PHP script is writing information to output. You can force that output to the browser when you want with this function. Have a look at this relative thread that has a snippet example.

How do I create a "Processing your request" page? [webmasterworld.com]

compose

5:59 am on Oct 18, 2005 (gmt 0)

10+ Year Member



Hello,

I use this flush() function. but it only works when i display information directly on browser if i use HTML table to display records it's not working.

like " echo $row['somevalue']; flush();" is working and if

i use "echo "<tr><td>$row['somevalue']</td></tr>"; flush();" it's not working.

Can u tell what is the problem?

Vineet.

jatar_k

3:26 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



when you use array syntax inside double quotes, which I don't do, you need a slightly different syntax.

either concatenate the string
echo "<tr><td>".$row['somevalue']."</td></tr>";

use commas between (only for echo)
echo "<tr><td>",$row['somevalue'],"</td></tr>";

or use braces
echo "<tr><td>{$row['somevalue']}</td></tr>";

compose

6:51 am on Oct 19, 2005 (gmt 0)

10+ Year Member




[ when you use array syntax inside double quotes, which I don't do, you need a slightly different syntax.
either concatenate the string
echo "<tr><td>".$row['somevalue']."</td></tr>"; ]

I also use this way sorry that in last post there was typing mistake so i enter array value in double quote.

But after using ur all three option stil i am facing same problem that output comes in bunch after complete processing of page.

I want to know who we can split our html page output. Means if some background processing is done by script, window is blank, instead of this we can show some output that is already parsed.

Please tell how to do this...

Vineet

Netter

9:44 am on Oct 26, 2005 (gmt 0)

10+ Year Member



layers + javascript

php is for nothing in that case.
use something like at dvd.box.sk
it shows LOADING div while the page is loading (see the code)
also many websites are using that kind of PLEASE WAIT message in DIVs (Plesk for example)