<?php setcookie ("Cookie40", "Text", time () + 3600); ?> <script> window.location = "./getcookie.php"; </script>