you didn't even change anything :/

possibly because you're trying to set the value of the cookie to a constant that doesn't exist (you need to use strings, as I've mentioned before). this may or may not be a problem.
this is the code that needs to change from using constants to "strings".
PHP Code:
setcookie("ID_my_site"gone$past);
setcookie("Key_my_site"gone$past);
setcookie("Admin_my_site"gone$past); 
as for the $errors thing not working -- take it one step at a time. if you don't understand it, don't just throw it into your script and hope it works. it won't. I tried to tell you it was simply an example of a concept; it is not something you could actually use in your script. don't worry about that for now.