<?php $name = "username"; $value = "ada"; $expires = time() + (86400 * 7); // 7 days from now setcookie($name, $value, $expires, "/"); ?> <html> <body> <p>The cookie has been sent to the browser.</p> </body> </html>
Click Run to execute this code.