Using cookies in PHP is quite simple, just make sure you set them before any HTML in your files.
setcookie("TestCookie", $yourValue, time()+3600);
Will create a cookie named TestCookie on the client, containing the value you have set in the variable $yourValue. The cookie will probably last 1 hour (3600sec), but don't put all your trust on that since it is client dependant.
$cookieValue = $_COOKIE["TestCookie"];
This will get the value from your TestCookie.
There is a ton of features with cookies you can use, and I'd say cookies is never the most secure way holding client states since it actually depends on the client.
http://php.net/manual/en/features.cookies.php