require_once("security.inc.php");
if (isset($_POST["login"]) && isset($_POST["pwd"]))
{
$userid = check_user(trim($_POST["login"]), trim($_POST["pwd"]));
if (!$userid == false)
{
session_start();
session_register("userid");
$_SESSION["userid"] = $userid;
setcookie("auth_cookie", get_auth_code($userid));
this is the code where the session is started.
thank you