Results 1 to 2 of 2

Thread: Sessions???

  1. #1
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sessions???

    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!

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    <script type="text/javascript">
    var phpCode = "<?php session_start(); echo $_SESSION['name']; ?>";
    document.write(phpCode);
    </script>
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •