title: session not created in php function
body: <p>i'm trying to make a login page in php using ajax and php functions..
  i'm trying to create a session inside the function. and i fail to make it work.
  this is basicly what i'm trying to do</p>
  
  <p>the ajax code is</p>
  
  <pre><code>$.post("process.php?do=createSession", 
  function(data) {alert("Data Loaded: " + data);});
  </code></pre>
  
  <p>in process.php i got this script</p>
  
  <pre><code>include ( 'bod_function.php' ); 
  $process_func = $_REQUEST['do'];
  echo BODeal::$process_func();
  </code></pre>
  
  <p>and in the bod_function.php i got this running </p>
  
  <pre><code>class BODeal {
  public static function createSession() {
      session_start();
      $_SESSION['test']='Success';
      return 'yeah';
     }
  }
  </code></pre>
  
  <p>i got the alert box running and saying <code>'yeah'</code> but <code>$_SESSION['test']</code> is empty. no session has been created.</p>