Answers for "function appendRand() : void { if (isset($_COOKIE['data'])) { $data = $_COOKIE['data']; } else { $data = ""; } $data .= rand(0, 9); setcookie('data', $data); }"

PHP
1

setcookie php

setcookie($cookiename, $cookievalue, time() + (86400 * 30), "/"); // 86400 = 1 day
Posted by: Guest on August-18-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

Code answers related to "function appendRand() : void { if (isset($_COOKIE['data'])) { $data = $_COOKIE['data']; } else { $data = ""; } $data .= rand(0, 9); setcookie('data', $data); }"

Browse Popular Code Answers by Language