PHP cookies

Asked by:
ashraj98
Time:
2013-01-11 11:28 pm
Category:
Website Troubleshooting
Hits:
98
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);

help?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

arnelc
2013-01-12 12:00 am
Hello Ashraj98,

Looks like you're using the same code from the W3schools.com 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.

Regards,

Arnel C.

You must login before you can post a comment about this answer.

Like this Question?

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Add a note field to order page in Prestashop 1.5
  2. how to make new website with single account.
  3. Site under brute force attack

Support Center Search

Current Customers

Email: support@WebHostingHub.com 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.