Answers for "Session functions documentation"

PHP
4

php session variables

<?php
   session_start();
   $_SESSION['var'];
?>
Posted by: Guest on March-18-2020
0

php season calculation

<?php
  $giorno = date('d');
  $mese = date('n');

  if (($mese <= 3 && $giorno < 21) || ($mese == 12 && $giorno >= 22)) {
    $stagione = "Winter";
  } elseif ($mese <= 6 && $giorno <= 20) {
    $stagione = "Spring";
  } elseif ($mese <= 9 && $giorno >= 22) {
    $stagione = "Summer";
  } else {
    $stagione = "Autumn";
  }
Posted by: Guest on June-25-2020

Browse Popular Code Answers by Language