Validating Forum inputs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wwolfson
    New Member
    • Jun 2007
    • 13

    Validating Forum inputs

    Hiya all,

    I've just built a simple forum thanks to "thescript - someone gave me a link to a very good tutorial.

    My problem now is this, how do I validate a textarea, which is saved in a mySQL database, such that users can't just input sql and bring down my database - i was thinking along the lines of just looking for quotation marks and then producing an error if any quotation marks are found.
    This means no quotes can be used though in the forum.
    Erm... any ideas? I've looked around but cannot find any site helping with this.
    I don't know if php has functions readily available i can use, or if i can download some?

    Thanks again,
    William.
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, William.

    Check out mysql_real_esca pe_string().

    Comment

    Working...