Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6603125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:57:58+00:00 2026-05-25T18:57:58+00:00

Why Cookies doesn’t store information in php ? even in this simple code ..

  • 0

Why Cookies doesn’t store information in php ?

even in this simple code ..

<?
   setcookie("test","Cookies teso");
   echo "My cookie value: ".$_COOKIE["test"];
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:57:59+00:00Added an answer on May 25, 2026 at 6:57 pm

    They will be available on the next page load. From the documentation:

    Cookies will not become visible until the next loading of a page that
    the cookie should be visible for. To test if a cookie was successfully
    set, check for the cookie on a next loading page before the cookie
    expires. Expire time is set via the expire parameter. A nice way to
    debug the existence of cookies is by simply calling
    print_r($_COOKIE);.

    Note that you need to set the cookies before any other script output is done:

    Like other headers, cookies must be sent before any output from your
    script (this is a protocol restriction). This requires that you place
    calls to this function prior to any output, including and
    tags as well as any whitespace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I do this, but the new cookie doesn't show up, just some other cookies
According to this answer, IE7 stores session cookies in memory and doesn't store them
I use the following jQuery (1.4) code to test whether cookies are accepted: $.get(http://localhost:8080/cookietester/cookietester,
This piece of code doesn't work; it's logging in into website which is using
I have the following code in my login method: Response.Cookies[cookie].Value = ...; Response.Cookies[cookie].Domain =
Can someone tell me why this doesn't work: $(document).ready(function() { $(#cookie).text(expanded); //panel toggle $(.btn-slide).click(function()
Where does Firefox store cookies and in what format are they stored
hi we are using FormsAuthentication.SetAuthCookie(profile.Id, false); Now the question is when does this cookie
By default, Glassfish v3 doesn't set the httpOnly flag on session cookies (when created
I have a problem with writing cookies in cakephp and even don't know how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.