How to set cookie in php?

Set cookie in PHP

 





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