custom COOKIE on custom page
i have problem with create function for set cookie dynamically.
when i try in custom page i have of course header is set and i tried something like this: in custompage.php:
myfunction($cookiename,$cookievalue);
in function.php
add_action("init","myfunction",10,2);
function myfunction($name,$value) {
setcookie($name,$value,time()+3600);
}
add_action("wp_head","mySEOfunction",10,2);
function mySEOfunction($name,$value) {
echo "some meta tags...".$name...
}
i have Missing argument 2 in function.php
i tried also this for SEO meta tags created dynamically but i have same problem...
any help?