how to make session in php code example
Example 1: php sessions
<?php
session_start();
$_SESSION['item_name'] = 'value';
$_SESSION['item_name'] = 0;
$_SESSION['item_name'] = 0.0;
$value = $_SESSION['item_name'];
?>
Example 2: create session in php
<?php
session_start();
$_SESSION["color"]= "blue";
$_SESSION["animal"]= "dog";
echo "The session variable are set up.";
?>
Example 3: echo session
print_r($_SESSION);
Example 4: $session php
<form action="login.php" method="post">
Dein Name: <br />
<input type="Text" name="name" />
<input type="Submit" />
</form>