Sr. PHP Programmer Question: Download Senior PHP Programmer PDF

How will you set cookies using PHP?

Tweet Share WhatsApp

Answer:

PHP provided setcookie() function to set a cookie. This function requires upto six arguments and should be called before <html> tag. For each cookie this function has to be called separately.

setcookie(name, value, expire, path, domain, security);

Download Senior PHP Programmer PDF Read All 202 Senior PHP Programmer Questions
Previous QuestionNext Question
How will you destroy the session?How can you sort an array?