Forums

Writing a form, whats the code to strip javascript? (2 posts)

  1. Frumph
    Member
    Posted 3 years ago #

    What's the code to strip javascript from a REQUEST['d form?

    is it?

    $text = stripslashes( $text );

    or

    $text = stripslashes(wp_filter_post_kses($text));

    What would I use to strip "all" html from an received form get?
    What would I do to make sure it's database safe?

  2. FWDrew
    Member
    Posted 3 years ago #

    You could use strip_tags. As for your database, it would be wise to at least filter any data coming in from the user with mysql_real_escape_string

    Hope that gives you some help.

    -Drew

Topic Closed

This topic has been closed to new replies.

About this Topic