I was using that script in place of the mod_cblogin.php and was going to have it as a stand alone module, just a small module showing new messages. However, even if I add it onto the end of the mod_cblogin.php it still gives that same error on whatever line theglobal $database, $my->id ;
falls on. If you're stumped I'll just try and find another way. Thanks for all your help so far.