Hi, I have just started learning php and I am trying to make a mobi site send a cookie so that visitors can switch between mobile and full site views. I feel like I have tried everything. I don't think the cookie is sending. I am using Google Chrome to search for the cookie, but nothing comes up. Is the following code right?I have placed it on the first line of code "before any html is sent"(according to the tutorials).
<?php $expireDate = time() +3600; setcookie("testcookie", "formywebsite", $expireDate, "/", "mobi.website.com");?>