Answers for "php save cookie"

PHP
2

cookie are not set in php

setcookie('username',$username,time()+60*60*24*365);
// 'Force' the cookie to exists
$_COOKIE['username'] = $username;
Posted by: Guest on May-15-2020
2

php set cookie

<?php
  $name = 'COOKIE_NAME';
  $value = 'VALUE';
  $expireTime = strtotime('+1 years');
  $path = '/';
  setcookie($name,$value,$expireTime,$path);
Posted by: Guest on December-09-2020
3

cookies php syntax

setcookie("cookie_name", "type_on_cookie", expiry_time(), "/");
Posted by: Guest on July-29-2020
0

hoew to store a cookie php

<?php
$expireDate = time()+2*24*60*60;
setcookie("Auction_Item", "Luxury Car", $expireDate);
?>
Posted by: Guest on July-06-2021

Browse Popular Code Answers by Language