Sr. PHP Programmer Question: Download Senior PHP Programmer PDF
How will you set cookies using PHP?
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);
setcookie(name, value, expire, path, domain, security);
Previous Question | Next Question |
How will you destroy the session? | How can you sort an array? |