Oh..well, if your database server is not 'localhost' then I think you'd want to use the server and port from the config file in place of "localhost", like:
Code:
$servername = $config['MasterServer']['servername'];
$port = $config['MasterServer']['port'] ? $config['MasterServer']['port'] : 3306;
$con = mysql_connect("$servername:$port",$config['MasterServer']['username'],$config['MasterServer']['password']);
Then change "http://toontowners.com/forums/" if that's not your forum.
ETA: and while we're at it, change the query line like this:
Code:
mysql_query("DELETE FROM tta_noticedismissed WHERE userid=" . intval($_COOKIE['bbuserid']));
to hopefully take care of that security issue.
Hope that helps.