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
the ajax code is
$.post("process.php?do=createSession",
function(data) {alert("Data Loaded: " + data);});
in process.php i got this script
include ( 'bod_function.php' );
$process_func = $_REQUEST['do'];
echo BODeal::$process_func();
and in the bod_function.php i got this running
class BODeal {
public static function createSession() {
session_start();
$_SESSION['test']='Success';
return 'yeah';
}
}
i got the alert box running and saying 'yeah' but $_SESSION['test'] is empty. no session has been created.