Why is it that in php you can open up a script tag like so and do the following:
<?php
print("<script>");
print("alert('hey');");
print("</script>");
?>
but you can't do this:
<?php
print("<script>");
print("document.getElementById('fName').value = localStorage.getItem('FirstName');");
print("</script>");
?>
I just can't understand what the difference is, if you can get javascript to work inside php, why can't you tap into localstorage?