$oldvalsince no new value is supplied"; } else { setcookie('val', $newval, $exptime); if ($oldval === "") echo "Cookie was unassigned"; else echo "Cookie had value$oldval"; echo "New value for cookie is$newval"; } ?> Change cookie page