Nevermind. I forgot to put "global $db" in the function. Otherwise this works fine.
LearnWebTutorials.com
Forum Rules