ok, your problem stems from lots of variable misnaming in your second foreach loop:
foreach($_POST as $key => $label)
Change "$label" to "$value" (or something else which is not used)
Change:
if($key == "sub"){}
else
{
to:
if($key != "sub"){
Which has exactly the same meaning, it's just a lot simpler. Change:
$td = "<div>$key : $lab</div>";
to:
$out .= "<div>$key : $value</div>";
And also change:
setcookie($key, $label, time()+(7200), "/");
to:
setcookie($key, $value, time()+7200, "/");
Then finally you'll need to change:
$label = "<div>Cookie Contains</div>";
to:
$out = "<div>Cookie Contains</div>";
And all your output will be stored in a variable called $out at the end. Oh and you can also remove:
$label;
$out;
$td;
because these lines have absolutely no effect.