PHP Function Compilation

Status
Not open for further replies.

Muffins

Member
May 12, 2012
18
0
Hi, I just had an idea for a compilation of functions that will help with some developments.

I hope this thread will help some people.
Please post in the format I do.

What's it for?

Filtering text(meant for POST and GET request's) to make sure there is no malicious code etc...

Usage:
filter(text to filter)

Actual function:

PHP:
    function filter($var)
    {
        return mysql_real_escape_string(stripslashes(htmlspecialchars($var)));
    }

Yes, I stole this from some cms and stuff.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
No updates on this thread for a while, thread locked.

PM me or another member of staff with privileged in this section to get your thread unlocked.
 
Status
Not open for further replies.

Users who are viewing this thread

Top