. . .

Send & retrieve cookies in Yii

Published: April 3, 2011

To retrieve a cookie with the specified name:

$cookie=Yii::app()->request->cookies[$name];

$value=$cookie->value;

 

To send a cookie: 

$cookie=new CHttpCookie($name,$value);

Yii::app()->request->cookies[$name]=$cookie;

Don't forget to share this post

    Let's Build Digital Excellence Together


    • Cost Efficient Solutions.
    • Minimal Timelines.
    • Effective Communication.
    • High Quality Standards.
    • Lifetime Support.
    • Transparent Execution.
    • 24/7 Availability.
    • Scalable Teams.

    Join Our 200+ Happy Clients Across Globe


    Free Consultation.

      Do you need help in strategy, innovation or growth of your startup/business? Experts from our team will get in touch with you.

      Please do not post jobs/internships inquiries here.