Being a rookie cookie handler, I can only guess your problem is you are not telling the cookie which domain it is operating in, try the line:
setcookie ("UserName", $UN, time()+3600, "/cgi-bin/", "www.mechanicmatt.com", 0);
/cgi-bin/ being the folder the cookie is ONLY allowed to perate in, so if it cannot be called into the root of the site of any other folder (but should still work in sub-folders of cgi-bin).
0 at the end being if it is allowed to operate over normal 'http' servers (1 if it can only work over 'https' servers).
BTW, can anyone help me with a cookie problem? I need to extend the life of my cookies past 1 hour, so can shoe me an example of using some method (whether it's PHP/CGI/HTML or whatever to make my cookies last longer before they 'go off'?)