<?php

$server = '192.168.1.50';
$username = 'sa';
$password = 'bpsmaroc';
$database = 'TestInOut';


try{
	$conn = new PDO("sqlsrv:Server=$server;Database=$database;", $username, $password);
	// $msg = 'is connected';
} catch(PDOException $e){
	die( "Connection failed: " . $e->getMessage());
}

$tsql = "set language french SELECT  U_CardCode,U_CodeProject,itemcode,incr FROM B1_BpsIncrimB1SLQuery";

	$getResults = $conn->prepare($tsql);

    
    $getResults->execute();
    $result = $getResults->fetchAll(PDO::FETCH_BOTH);
    
    $data = array();

foreach($result as $row)
{
			echo  $row["incr"]  ;
			$_SESSION['incr']  = $row["incr"] ;
}

$conn = null;

       
    

?>