function addMember($userid)
{
    if (!empty($_SESSION["project_ID"])) {
        addMemberToProject($_SESSION["project_ID"], $userid);
    } else {
        echo "Please select project first!";
    }
}
function createProjectToDB($projectname, $projectcommand, $userid, $projectstate)
{
    SQLConnect();
    $sql = "INSERT INTO requiremanagerdb.project(name,command,admin,state) values ('{$projectname}', '{$projectcommand}', '{$userid}', '{$projectstate}') ";
    if (!mysql_query($sql)) {
        echo "Create Project fail!";
    } else {
        echo "create project success!";
        $projectid = getMaxProjectIDFromDB();
        addMemberToProject($projectid, $userid);
    }
    connectClose();
}