RE: [PHP] need an idea, please help
| From: | Matthew Mundy | Date: | Fri, 20 Oct 2000 17:43:24 +0000 |
| Subject: | RE: [PHP] need an idea, please help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21445@lists.php.net to get a copy of this message | ||
No they wouldn't HAVE to, but it would make the game a little more
personal:) Thanks for the great help. I just hope I can help others as
much when I can.
---Matt
On Fri, 20 Oct 2000, Boget, Chris wrote:
> > Perfect! I could even have the smaller frame be a message
> > type thing so the players could taunt each other :) (make
> > them WANT to refresh that frame to see what the latest
> > snappy retort was :) ).
>
> Well, the players wouldn't refresh the page themselves unless
> they really wanted to. This task would be taken care of by the
> browser
>
> > Oh...Um, how would I do this? (As I said, I'm learning here
> > when I don't have homework or a test or work or ...)
>
> In the page in the very small frame, you are going to have to
> echo:
>
> echo "<head><
> META http-equiv=\"REFRESH\" content=\"30; URL=your_page\">
> </head>\n";
>
> And what that does is every 30 seconds, that frame will load
> "your_page". The PHP script on that page will need to query
> the database to check the state of the game to see if it's changed.
> If it does, echo out some javascript that will trigger something
> in the main frame that tells it to reload. You could probably
> just do something like:
>
> parent.frames[1].location = chess_game_page.php
>
> or something along those lines to force the refresh.
>
> The above are just starting points. You will need to do further
> research to put it all together.
>
> Chris
>