Addendum to previous message. If I remove the - $sql - from the function checkerrors line, then I don't get this error anymore. But what am I losing by not having there? Jon Minding of Madness