1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    3
    Vote Rating
    0
    S_panic is on a distinguished road

      0  

    Exclamation how to get session variable that php set it.

    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
    1
    devnull is an unknown quantity at this point

      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
    victerz is on a distinguished road

      0  

    Default js php

    js php


    in javascript


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

Thread Participants: 2