Sanity check: function return
Posted: Mon Jun 16, 2008 12:40 pm
Hi all, I'm building my first php app. It's a one-page CMS for a one-page website for a guy who has a small business.
I'm debugging all my code. I have an escape_data function that I copied out of a book and is not working. So I've been paring down the function and it's still not working. Here's it is at the minimum:
What's weird is that
is working just fine.
Is there something wrong with how I'm structuring my function?
I'm debugging all my code. I have an escape_data function that I copied out of a book and is not working. So I've been paring down the function and it's still not working. Here's it is at the minimum:
Code: Select all
function escape_data ($data) {
return ($data);
}
//Validate and clean data
echo (escape_data($_POST['message']));
Code: Select all
echo ($_POST['message']);Is there something wrong with how I'm structuring my function?