Re: Passing variables between pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would think debugging a chain of code is more of a nightmare than
debugging a $_SESSION variable.  Also, HTTP is a stateless protocol no
matter what you do.  If you want to pass data around, the only ways to
do it are $_SESSIONS and cookies with $_SESSIONS being preferable as
they stay on the server.

 
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



tedd wrote:
> However, there is another way, but it takes a little forethought.
>
> The technique is simply to continue the flow of a "single" script by
> using includes. Here's an example:
>
> http://www.webbytedd.com/bb/tedd/index.php
>
> The code behind this is very simple. You simply branch to other
> scripts by doing this:
>
> ob_clean;
> include('the-next-script.php");
> exit();
>
> This keeps ALL the variables intact because it acts like one large
> script. -- it's not stateless and this technique works.
>
> However, what I don't understand is why it isn't used more often?
>
> Unless there is something here I don't understand, I believe I could
> use this technique to write all the scripts I currently use without
> ever using a session variable.
>
> Cheers,
>
> tedd
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux