I've set the cookie in header.php like below

<?php if($_GET['signup'] == '123' && !isset($_COOKIE['sign'])){
    setcookie("sign", "1", time()+3600);
} ?>

now i have to understand this cookie value within the page register.php. however i cant retrive the worthiness for the reason that page. in Register.php page i'm while using below code for look into the cookie,

<?php
/**
Template Name:  Sign Up
 */
$ck = $_COOKIE['sign'];
echo "cookie".$ck;
if(isset($_COOKIE['sign'])){
    header("Location: https://www.ap.com/app/signup.jsp?signup=123");
}
else
{
    header("Location: https://www.ap.com/app/signup.jsp");
}
?>

however it would go to the else condition only (when the cookie is placed also). kindly advice...

Try to produce a wordpress plugin and hook with init action: http://codex.wordpress.org/Plugin_API/Action_Reference/init

function my_set_cookie() {
    if($_GET['signup'] == '123' && !isset($_COOKIE['sign'])) {
        setcookie("sign", "1", time()+3600);
    }
}

add_action('init', 'my_set_cookie');