It seems i read some wrong tutorial. :( I have added few hundred of data in database. Is there anyway to fix it?
When i send the data to database, how do i strip the html tags? Should i use strip_tags? On Sat, Aug 27, 2011 at 2:05 AM, Ryan Schmidt <[email protected]>wrote: > > On Aug 26, 2011, at 15:26, Prabha vathi wrote: > > > $author_fields[Aut']['name'] = > addslashes(Sanitize::html($this->data['Post']['name'],array('remove' => > true))); > > > > This is the insert line. > > Sanitize::html is for when you're outputting something to the page. It's > not for use when storing in the database, and yes, I suspect that's the > function that's converting your text to html entities. > > Your use of addslashes is unrelated to the problem you're reporting but > most likely also incorrect. CakePHP knows how to encode data properly to > talk to the database, and doesn't need you to add slashes for it. > > > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > at http://groups.google.com/group/cake-php > -- -- Prabhavathi http://www.indiapublicforum.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
