Results 1 to 3 of 3

Thread: how to get session variable that php set it.

  1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    3
    Vote Rating
    0
      0  

    Exclamation how to get session variable that php set it.

    I set a session in a php with this code
    <?php
    ob_start();
    session_start();
    $x="sa";
    session_register($x);
    ?>

    and I want extJs to get a $_session[x] variable.
    how to do this?it can do this?

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    3
      0  

    Default

    same way you would get any other piece of data from the server.
    either echo it into the php script's output, or fetch it separately via ajax.

  3. #3
    Ext User
    Join Date
    Feb 2008
    Posts
    23
    Vote Rating
    0
      0  

    Default js php

    in javascript


    PHP Code:
    var yourJSvar = '<?php echo $yourPHPvar?>';
    and js variables into php are done via ajax etc

Posting Permissions

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