I am trying to set a php variable value to a HTML5 sessionStorage. Is this feasible? Check my code below:
<script>sessionStorage.username = </script><php echo $_GET["user"]; ?>
Thank you in advance
Try this:
<script>
sessionStorage.username = '<?php echo $_GET["user"]; ?>';
</script>
Code edited