Re: Cookie problem
| From: | Donald Undeen | Date: | Thu, 17 Aug 2000 14:57:45 +0000 |
| Subject: | Re: Cookie problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12239@lists.php.net to get a copy of this message | ||
Hi there. I checked out that class,and I have a question:
I use FastTemplate, which means that there are no "echo" or "prints" in any
of my code, except for error checking.
The entire page is printed when you call something like $tpl->FastPrint();
at the end of the script.
This form class, as well as others I see, returns it's output by printing
to the screen, not by returning values that the person using the class
would do something with.
If I were to use this class, I'd need to turn collect all the "echos" into
a string, and return the string, and eliminate the echos.
However, if the class were written that way to begin with, a person who
wasn't using FastTemplate could still get print the returned data after
they gt it back from the funtion.
Anyways, my point is that becuase so many people use templates to separate
HTML from PHP and clean up their code, it's seems to me that people writing
classes for general consumption should never issue print statements from
within their classes; they should instead only return values, which the
person using the class could then either print or plug into a template.
this is just my .02, and it's a pretty broad statement, so I would welcome
someone showing me why the above is unreasonable, or none of my business.
It's just that template use seems prety common, and classes like this
aren't really compatible with that kind of coding practice.
Don Undeen
dundee@gator.net
"Boget, Chris" wrote:
> > I'm making a huge form that people access and fill out. The
> > thing is that I am having to check every field to make sure
> > they are entering the correct information spanning 4 pages.
> > So I thought I would use cookies instead of having to pass a
> > ton of hiddens throughout the program.
>
> Check out Jay Bloodworth's FormClass. It does a *really* good
> job at form validation. It is THE class if your are using forms.
> You can get it the PX at:
>
> http://px.sklar.com/code.html?code_id=34
>
> I cannot speak highly enough of it.
>
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net