<form action="" method="GET">
<input type="text" name="name">
<input type="submit">
</form>
<?php
if(isset($_REQUEST["name"])){
$name = $_REQUEST["name"];
setcookie("name", $name, time()+3600);
}
if(isset($_COOKIE["name"])){
print_r("Здравствуйте ". $_COOKIE["name"]);
}
?>