ole90
07-24-2007, 06:49 PM
So heres my class:
class secure{
var $data2;
function check() {
$data2 =mysql_real_escape_string($data2);
$data2 = htmlentities($data2);
$data2 = strip_tags($data2);
}
}
Basically what i want to do, is everytime i have a variable in my page that say is inputted from the user, say $message = ($_POST['mesage']);, then i want this to take the data and check it for all of the above.
$username = ($_POST['username']);
$check = new secure;
$check->data2 = $username;
$check->check();
echo"$username<br>";
But the problem is this doesn't seem to be working.
I typed in my username as <b>username</b> and it still comes up bold when it clearly should remove the bold statements.
Any help?
class secure{
var $data2;
function check() {
$data2 =mysql_real_escape_string($data2);
$data2 = htmlentities($data2);
$data2 = strip_tags($data2);
}
}
Basically what i want to do, is everytime i have a variable in my page that say is inputted from the user, say $message = ($_POST['mesage']);, then i want this to take the data and check it for all of the above.
$username = ($_POST['username']);
$check = new secure;
$check->data2 = $username;
$check->check();
echo"$username<br>";
But the problem is this doesn't seem to be working.
I typed in my username as <b>username</b> and it still comes up bold when it clearly should remove the bold statements.
Any help?