Results 1 to 3 of 3

Thread: Cleaning a variable string for database entry

  1. #1
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Cleaning a variable string for database entry

    How do I properly clean a string in preparation for database entry?
    The string is not inputted through get or post, but rather returned from a script retrieving an email message body via imap_fetchbody() and i want to preserve html tags.

    Is just calling this->Input->xssClean($my string) enough?

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Cleaning a variable string for database entry

    The database driver already cleans. You just have to pass it in the "execute" part to replace the ? in the "prepare" section

  3. #3
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Cleaning a variable string for database entry

    nice'n'easy then :D

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •