Hello All,

In PHP file i have session variables like 'token'.
When I am using the same PHP file in java script

$_post("path_to_php_file.php",{
}`, function(data){
});

Then it is not giving me that token.
Why so?

Am not starting any session in that file again.

Are you starting session anywhere? If you have session_start then session variables should be available to you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.