I intialize $valcookies as false. However, I then use my checkcookies() function, which, after checking, does:
$valcookies = true;
I tried to call $valcookies in another function after this had happened, and $valcookies was still false.