E
E
Evgeny Borisov2011-08-08 08:30:35
Mootools
Evgeny Borisov, 2011-08-08 08:30:35

Mootools request & $_session?

There is a JavaScript code written using the mootools framework

function rangComment(doing,id,mode){<br/>
var myRequest = new Request({<br/>
url:'/voite-comment.php',<br/>
noCache:true,<br/>
method: 'get',<br/>
onSuccess: function(responseText){<br/>
alert(responseText);<br/>
}<br/>
});<br/>
myRequest.send('do=' + doing + '&comment=' + id + '&mode=' + mode);<br/>
return false;<br/>
}

The function call goes like this
rangComment('down','101','conf');
In a php script that generates a page with function calls, there is something like this code
session_start();<br/>
$_SESSION['test']='good';

The voite-comment.php file itself
session_start();<br/>
print_r($_SESSION);<br/>

Question. How to get voite-comment.php to see the session?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CrazySquirrel, 2011-08-08
@CrazySquirrel

Try
if (!isset($_SESSION)) {
session_start();
}

A
Anatoly, 2011-08-08
@taliban

He should see the session without any action

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question