HOME / BLOG / BLOG-POST

How to set cookie in php?

Set cookie in php

setcookie('otp', $otp, time()+62208000, '/', $_SERVER['HTTP_HOST']);
//otp is the cookie name here 

 


about authors

Sandip Das

Web Developer

Once a legend said “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” – Martin Fowler.



POST COMMENTS

Leave a Reply

Your email address will not be published. Required fields are marked *