Re: Using require instead of redirect architecture

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

 



> 1.  p1.php would post to itself.  Do data validation.  After data validation
>         upon error, include p1.php again with included error messages
>         upon success, redirect to p3.php with congrats.

Yeah, I could do this, but it uses a redirect, and like you said, it's gnarly.

> 2.  p1.php would post to p2. perform data validation.
>         upon error, save data into session variable, redirect back to p1.php,
>                 display error messages inline
>         upon success, redirect to p3.php, display congrats

I've already got this working, per thread of a couple days ago. But it
uses a redirect.

> I personally like the second option.  It is cleaner.  Each page/script has a single purpose in life.
>  It just makes better sense to my small little mind.

I agree as well. But I'm trying to get away from multiple trips to the
server for simple page calls, per some pundits on the list. :) So I'm
trying to learn a different architecture, and I'm not getting it yet.

-- 
RE, Chicago

-- 
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