if(!$_POST['cpf_check']){ ?>
} else {
$cpf_check = preg_replace("/[^0-9\s]/", "", $_POST["cpf_check"]);
$odbc_dsn = 'DRIVER={SQL Server};SERVER=10.134.25.22;DATABASE=PROTHEUS';
$odbc_user = "folha";
$odbc_pass = "unitec";
$con = odbc_connect($odbc_dsn, $odbc_user, $odbc_pass) or die(odbc_error()/*."erro na conexão com o banco de dados HOMEPAGE no servidor HERCULES: "*/);
//$con = mssql_connect('localhost:3307', 'root', 'yuri') or die('Não foi possivel conectar');
//$con = mssql_connect('10.134.25.22', 'folha', 'unitec') or die('Não foi possivel conectar');
//mssql_select_db("PROTHEUS", $con);
//checar se já existem 5 pessoas registradas
$query = "SELECT * FROM SRA010 WHERE RA_CIC='$cpf_check'";
$result = odbc_exec($query, $con);
/*if(mssql_num_rows($result)==0){
die("false");
}*/
$nascimento = $linha["RA_NASC"];
while($linha = odbc_fetch_array($result)){
$cpf = utf8_encode($linha["RA_CIC"])."*";
$nome = utf8_encode($linha["RA_NOME"])."*";
$mae = utf8_encode($linha["RA_MAE"])."*";
$pai = utf8_encode($linha["RA_PAI"])."*";
$nasc = utf8_encode(substr($linha["RA_NASC"], -2)."/".substr($linha["RA_NASC"], 4, -2)."/".substr($linha["RA_NASC"], 0,-4))."*";
}
//mssql_close($con);
?>
} ?>