NYCPHP Meetup

NYPHP.org

[nycphp-talk] Offset error during unserializing data

John Daly jdaly at panix.com
Thu Nov 3 17:39:42 EST 2005


Well, I liked it because that was one of the things that Quickform can do. 
I just have to apply it more carefully, heh. That code was really there 
because it included a nl2br for a textarea, but the textarea ended up 
getting scratched.

thanks,

JD


----- Original Message ----- 
From: "David Mintz" <dmintz at davidmintz.org>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Thursday, November 03, 2005 5:24 PM
Subject: Re: [nycphp-talk] Offset error during unserializing data



You might want to reconsider your reasons for adding slashes and escaping
html entities in the first place. If you're planning to use the data in a
db query you can use prepare/execute at query time. If you're planning to
re-draw the form, QuickForm will do the escaping for you. If you're
planning to store the form input in a db and display it later, you can
escape it at retrieval time.

If all this is insultingly obvious, my apologies (-:

On Thu, 3 Nov 2005, John Daly wrote:

>
> Aha,  I found the error.  Dang it.
>
>    if ($form->validate())
>       {
>         //$form->applyFilter('__ALL__', 'addslashes');
>         //$form->applyFilter('__ALL__', 'htmlentities');
>         $form->process('do_action', true);
>       }

---
David Mintz
http://davidmintz.org/
_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org 




More information about the talk mailing list