Session Date Encode


 

Session Date Encode

In this example you will learn about session date encode in PHP.

In this example you will learn about session date encode in PHP.

Session Date Encode

In this example, you will learn how to encode date session. First create a HTML form and call the PHP form action in it.

In PHP code, use session_encode () function to access session date encode.

For this first register the session and define the session variable. 

<?php
session_start();
session_register('Roseindia');
$_SESSION["Roseindia"]= "Roseindia";
session_encode();
?> 

HTML Action Form

<html>
<head>
<title>Encode Session Data</title>
</head>
<body>
<form action="sessiondecode.php" method="get"/>
<input type="submit" name="submit"/>
</form>
</body>
</html>

Ads