sayedsohail Posted June 26, 2007 Share Posted June 26, 2007 Hi everyone, I got a scenario where i had to create or set a phpsession from javascript? how could i do that, any help is highly appreciated. if (document.getElementById('make').value !="") { setphp session make } I know i posted this is javascript aswell, please no grief. Link to comment https://forums.phpfreaks.com/topic/57246-php-session-in-ajax/ Share on other sites More sharing options...
r-it Posted June 26, 2007 Share Posted June 26, 2007 why don't you store the session into a variable on some php script, like this: <?php session_start(); $name = $_SESSION['the_user'];//(assuming the session has been created elsewhere) echo $name; then you use you resonseText to have it available in javascript, then you've gt it Link to comment https://forums.phpfreaks.com/topic/57246-php-session-in-ajax/#findComment-283228 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.