Catch information from the localstorage in a variable – Atrapar informacion del localstorage en una variable

  • Autor de la entrada:
  • Categoría de la entrada:PHP

<!doctype html>
<html>
<head>
<meta charset=»utf-8″>
<title>Localstorage</title>
<script src=»//code.jquery.com/jquery-1.11.3.min.js»></script>
<script src=»//code.jquery.com/jquery-migrate-1.2.1.min.js»></script>
<script>
localStorage.setItem(‘email’, ‘inteligenciafutura@hotmail.com’);
localStorage.setItem(‘password’, ‘12345’);
</script>
</head>

<body>
<?php
$myphpvar = «<script>document.write(localStorage.getItem(‘email’));</script>»;
echo $myphpvar;
?>
</body>
</html>