This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Sessions

Modify a PHP Session Variable

To modify a session variable simply overwrite it.

Array ( [favcolor] => yellow )

// start a session if one has not started yet
<?php
session_start();
?>

// modify existing session variable and display it
<?php
// to change a session variable, just overwrite it
$_SESSION["favcolor"] = "yellow";
print_r($_SESSION);
?>