I'll give it a shot.
First, when you say you're including, I find included files work better if they have <?php ?> tags around them. IE, don't just include a file with text, add the tags, even if you have to break in and out of the php.
Second...
It would be nice if you posted a bit more code. 🙂
But anyway, the error of undefined function usually means you have forgotten to include the file in your code somewhere, so don't forget to do something like:
require_once('includes/includefile.php');