Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PHP: Dealing with special chars in CMS with Codeigniter?

Options
  • 18-03-2010 7:00pm
    #1
    Registered Users Posts: 1,086 ✭✭✭


    I have a codeigniter CMS as the backend of my website.

    I'm trying to store special characters properly in my mysql database.

    The special characters are only characters such as £ and € symbols.

    When I'm storing from the page I am storing a title and input from a wysiwyg also.

    The title could well be storing a euro or pound sign.

    What is the best way of storing everything to the database correctly?

    Do I use htmlentitles() when storing the information? Do I use it on both the wysiwyg content and the plan text content? Is there a correct procedure for doing this?

    When displaying it I have to on occasion put the information in an edit form. This is similar to the insert content page only the fields have been prefilled from the database. Depending on how the info is stored on the database depends on whether I use htmlentities() or not. When displaying the wysiwyg info normally on a page I don't think I should be using the htmlentities() function.

    Any help?


Advertisement