Is there possible to convert Seesion data from Javascript to PHP and vice versa? Something like (I’m not sure about the input format in javascript.):
<script>
session.setAttribute("username","John");
</script>
<?php
echo $_SESSION["username"]; // it will write "John"
?>