I don't understand, the function doesn't exist, and even if I change it to some absurd names, it still doesn't work. Can anyone find the problem?
function mss($value){
$data = mysql_real_escape_string(trim(strip_tags($value)));
return $data;
}
EDIT: I forgot to mention, its XAMPP
That will mean that you've either defined the function in two separate spots, or your including the same file twice.
Use include_once/require_once instead of include/require.
Ben Rowe's answer is almost assuredly the reason why it's happening.
I don't recommend this but you can always wrap your function in function_exists()
if(!function_exists("mss")) {
function mss($value){
$data = mysql_real_escape_string(trim(strip_tags($value)));
return $data;
}
}
This solution is messy. It's almost always more preferable to find out WHY your file is being included twice or where this function is defined twice. But, for special circumstances this solution could be appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With