I am setting a cookie with name that depends on a variable.
$PollID = 3;
setcookie("Poll" . $PollID, "Y", time()+ "604800");
So that the cookie is names Poll3 and has a value of "Y".
I want to check for the cookie from a function such as:
function check_cookie($PollID) {
code for checking cookie
}
PollID = 3;
check_cookie($PollID);
I want to be able to join "$Poll" and $PollID and then check whether the resulting variable name exists or has any data in it.
Is this possible?