give_cookie.php
Other answers are right, but there is another consideration. Cookies get set when the server sends the html to the client, and they are received from the user when the user requests the page. That means, if you try to read a cookie you just set correctly, it will be empty until next time the user reloads the page. The only way to avoid this is, as you did, not sure if on purpose or not, to assign manually the cookie's value and set it at the same time since it is a superglobal. This is NOT a good practice since the value of the Cookie gets lost for this execution. This should work but not do much work:
give_cookie.php
jar.php
PS, there are many more problems with your code (besides it does nothing useful). Tell us what you are trying to achieve so we can help you a bit more.