Basically, the way I see it is I would define my value variables first...
IF(ISSET($COOKIE['phone']):
$nphone = $COOKIE['nphone'];
ELSE:
$nphone = "";
ENDIF;
Then later in your value, just set it like so:
<input type='text' name='nphone' value='$nphone'>
That's probably the best way, but if you have a ton of values, it can be lengthy code... But it doesn't slow things down too much.