camrydad Posted January 7, 2010 Share Posted January 7, 2010 Hi Guys, First post here.... So here is what I want to do..... Another system is posting an XML to our server. Inside the XML is an value like '1231231234'. I want to set the session when I process this XML. The next time I get an XML with the same value '1231231234'. I want it to be considered the same session. Is this possible? I've been playing with the following code snippet and can't seem to quite get the session to stick. Any hints would be much appreciated, thank you very much. <?php session_start(); session_id("1231231234"); session_name("1231231234"); if (isset($_SESSION['stuff'])) { echo 'stuff is already there<br/>'; } else { $_SESSION['stuff'] = "1231231234"; } echo 'session id is set to ' . session_id() . '<br/>'; echo 'session name is set to ' . session_name() . '<br/>'; echo 'session var stuff is set to ' . $_SESSION['stuff'] . '<br/>'; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.