Forum

What is Cookie and how to set Cookie?

This thread contains 1 reply, has 2 voices, and was last updated by  darshan.soni007 9 months, 1 week ago.

  • Author Replies
  • #52969

    What is Cookie and how to set Cookie?


  • #52988

    Hello Sonal,

    Cookies are small pieces of data stored as text on the client’s machine. Normally cookies are used only to store small amounts of data, including user preferences, time and more.

    Setting a cookie Syntax:

    bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]])

    Example:
    setcookie(“test”, “user”, time()+3600);

    The above code will set a cookie having the name test, value user and will expire an hour after it is set.

    setcookie(“test”, “PHP-Hypertext-Preprocessor”, time()+60, “/location”, 1);


You must be to reply to this thread.Please or . Registration is 100% free.

GET FREE CONSULTATION

Call Us Now For Free Consultation97370 05566

Our experts listen to you patiently and suggest you the right course after conducting a personality profile test. Register your interest below to schedule personality profile test for you.

SUBSCRIBE TO OUR NEWSLETTER

Contact Us

Working Hours

  • Monday9:00 AM – 9:00 PM
  • Tuesday9:00 AM – 9:00 PM
  • Wednesday9:00 AM – 9:00 PM
  • Thursday9:00 AM – 9:00 PM
  • Friday9:00 AM – 9:00 PM
  • Saturday9:00 AM – 9:00 PM
  • SundayClosed
Copyright 2016-2019 Smart Mentors. All Rights Reserved.

Login

FORGOT PASSWORD

Sign up now to Become An Instructor

Register your Interest