PDA

View Full Version : Sessions???



costas
01-22-2007, 07:27 PM
Hi to all,
I need to get the values from some php sessions using javascript! Is there a way I can do that? I've "googled" it, but found nothing! I mean in php you get a value like this: $val = $_SESSION["name"];! How can I get it using javascript?

Thanks in advance!

mburt
01-22-2007, 07:28 PM
<script type="text/javascript">
var phpCode = "<?php session_start(); echo $_SESSION['name']; ?>";
document.write(phpCode);
</script>