hello all i've a problem with php session variables; in fact the issue is about a session variable that i've created in a php file and can't be accessed in another one requested by ajax.
below is the code of ajax.html the page from witch an ajax request is sent :
console.log('JQuery Ready')
$.get(
'http://localhost/php_files/ajax.php',
false,
function(data,status){
console.log('data is'+data+' '+'status is ' +status);
},
'text'
);
Next the Page Request ajax.php
if(isset($_SESSION['ses'])) echo 'session working';
else echo ' session not working';
And Finally the file Where i 've created the session variable :
session_start();
$_SESSION['ses']='session';
echo $_SESSION['ses'];
what should i do to fix this problem ?
What I have tried:
i've tried to send data with ajax to a php page