PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
//prepare variables from text fields for DB entry
function text_prep($text) {
$text = strip_tags($text);
$text = htmlentities($text);
$text = addslashes($text);
$text = nl2br($text);
}
And I've got this form/code on a separate page to call the function and make the appropriate transformations:
Thanks, Twig! I knew it was something simple that I was overlooking. Kind of hard for PHP to tell me something if I don't tell it to tell me something!