Re: Morph an object
| From: | Lars Torben Wilson | Date: | Thu, 05 Jun 2003 09:12:32 +0000 |
| Subject: | Re: Morph an object | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150309@lists.php.net to get a copy of this message | ||
On Wed, 2003-06-04 at 17:18, Info@Best-IT wrote:
> You have the problem right. What do you mean by a "server push"? Sounds
> interesting...
>
> Anyway I have to display something. Since its a login, the user needs their
> interface. I think I'll have to introduce another page... I'd love to
> avoid that though...
>
> /T
Search for "server push" (use quotes) on google...essentially, it means
that the server can update information in the browser. Unfortunately, it
is extremely limited and usually not worth the hassle.
My suggestion would be to do something like this: have a page which
shows a login form. The form posts back to itself (the same page). When
there is no input, the script displays a blank login form. If there is
input, the script attempts to validate the login data. If the data
validates, the script somehow calls the next page (sends a redirect
header, or include()s the code, or instantiates that page's class,
etc...). If not, it redisplays the form, perhaps with some added
information about what went wrong. It's important to note that nothing
is ever sent to the browser until all needed information is
known...that way, you always have the option to alter the output, or
send a redirect header, or whatever.
Torben
--
Torben Wilson <torben@php.net> +1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com http://www.themainonmain.com
-----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----