NYCPHP Meetup

NYPHP.org

[nycphp-talk] Offset error during unserializing data

David Mintz dmintz at davidmintz.org
Thu Nov 3 17:24:21 EST 2005


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/



More information about the talk mailing list