<script> $(document).ready(function($) { $.ajax({ type: "POST", url: "http://domainB/setcookie.php", data:{ 'id': 'value' }, success: function(data){ console.log(data); } }); }); </script>
<?php setcookie("u_id", $_POST["id"], 0, '/'); ?>
The result of $_COOKIE["u_id"] is NULL EMPTY. I want $_COOKIE["u_id"] is "value".
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)