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 8754803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:42:42+00:00 2026-06-13T13:42:42+00:00

This is the very simple code I am using to set a cookie in

  • 0

This is the very simple code I am using to set a cookie in PHP:

setcookie("vgc_email", $userinfo['email']) or emsg("Unable to set cookie");

Error_reporting is set to E_ALL and is not giving an error, however, Unable to set cookie is given when I attempt to run this code, and no cookie is set. I have made sure that $userinfo['email'] is not empty. I am also sure that I am able to receive cookies, when using Facebook connect is has set a cookie on the website.
So why won’t this one work?

  • 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-06-13T13:42:43+00:00Added an answer on June 13, 2026 at 1:42 pm

    From the manual:

    If output exists prior to calling this function, setcookie() will fail
    and return FALSE. If setcookie() successfully runs, it will return
    TRUE. This does not indicate whether the user accepted the cookie.

    so most likely, you are outputting data before calling setcookie().

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

Sidebar

Related Questions

This very simple code: #include <iostream> using namespace std; void exec(char* option) { cout
In this very simple code example, messages get lost every once in a while.
This is a very simple code in place of a bigger problem, but I'm
There's this very simple bit a code <asp:TextBox ID=txbVipNumber runat=server /> <asp:TextBoxWatermarkExtender ID=tbweVipNumber runat=server
Which method is very effective and simple to code to attain this functionality ?
Maybe a very simple question. How can I put in this code <Query> <Where>
Here is a very simple chunk of code using a jre 1.6 run time
I am getting the proverbial knickers in a twist. For this very simple code:
Check out this code. This is a very simple JavaScript object which is implemented
Consider this simple python code, which demonstrates a very simple version control design for

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.