PHP cookies

Asked by:
ashraj98 / 15 Points
2013-01-11 7:28 pm EST
Website Troubleshooting
I am trying to set some cookies with php, but it's not working.

when i try
if (isset($_COOKIE['NAME'])) it returns false. i set the cookie with
setcookie("NAME", "VALUE", time()+3600);


To ask this user for more information, please first login.

To submit an answer, please login.



16,349 Points
2013-01-11 8:00 pm EST
Hello Ashraj98,

Looks like you're using the same code from the page (PHP Cookies), but the one difference that I see is the double quotes around user. Try changing that to match the code they gave in W3c schools and see if it doesn't fix the problem. If it does not fix the problem, you may need to review your in the context of your entire site. Remember that we generally do not provide full coding support, but we'll do our best to point you in the right direction.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.


Arnel C.

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.