for coockie: http://www.php.net/manual/en/function.setcookie.php and for session: http://www.php.net/manual/en/ref.session.php