I have this function and I want to change the function so that there is no risk of injection. The function retrieves the form information:
function retrieve(){
if(isSet($_POST['text'])|| $_POST['text']==" ") return null;
return $_POST['text'];
}
I think I found with htmlentities:
function retrieve(){
if(isSet($_POST['text'])|| $_POST['text']==" ") return null;
return htmlentities($_POST['text']);
}