Jump to content

Webservice and session


elhelaly1999

Recommended Posts

Hi ,

how can I use session in my web service ?

 

if I use web service like this

 

web service server :

<?php

function greet($param) {
session_start() ; 
$_SESSION['id'] = "hiiiiiiii" ;
    $retval = '<a href="test2.php">Go to page print my session variable</a>';
    return new SoapParam($retval, 'greetReturn');
}
$server = new SoapServer(null, array('uri' => 'http://localhost/test'));
$server->addFunction('greet');
$server->handle();
?>

 

 

I found that session start and putting my variable into the session with this way not working but I can't find how can I make it work ?

 

Can I find help here ?

Link to comment
https://forums.phpfreaks.com/topic/115824-webservice-and-session/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.