<?php
$id = array("3444","3520");
$name = array();

$serverName = "GMGIS\SQLEXPRESS"; //test server 201
   $username = 'BIMuser';
   $password = 'Component3444';
   $dbname = '21000X';
   
   $connectionInfo = array("Database"=>"$dbname", "UID"=>"$username", "PWD"=>"$password", "CharacterSet"=>"UTF-8");
   $conn = sqlsrv_connect($serverName, $connectionInfo);
   if($conn === false){
	   die(print_r(sqlsrv_errors(), true));
   }
   foreach($id as $value){
    $account = 'maa'.$value;
    $password = md5('maa'.$value.'BIM');
    $sql = "INSERT INTO [21000X].[dbo].[User_Account] ([user_ID],[user_account],[user_password]) VALUES ('".$value."','".$account."','".$password."')";
    //sqlsrv_query($conn, $sql);
    $fetchResult = sqlsrv_query($conn, $sql);
   }
   
   
      
    sqlsrv_close($conn); 

?>