<script> document.cookie = 'name=David' ; </script> Page: get_cookie.php <?php var_dump($_COOKIE['name']); ?>