I would like to insert data from a form using php into mssql 2012.

The above picture shows I installed drivers for php to work with mssql and after testing the connection it was success.
Following is the script written to do the insertion:
$serverName = "SUPERMAN";
$connectionInfo = array('Database'=>'xikwambene', "UID"=>"develop", "PWD"=>"develop");
$conn = sqlsrv_connect($serverName, $connectionInfo);
if($conn) {
echo "Connection established.<br />";
}else {
echo "Connection could not be established.<br />";
die(print_r(sqlsrv_errors(), true));
}
if(empty($_POST) === false && empty($errors)=== true)
{
$id = $_POST['id'];
$name = $_POST['name'];
$query = "INSERT INTO dbo.test (id,name)
VALUES ('$id','$name')GO";
$result = sqlsrv_prepare($conn,$query)or die('Error querying MSSQL database');
sqlsrv_execute($result);
//redirect
header('Location: Address_insert.php');
exit();
}
?>
Now the problem is nothing gets inserted into the database, and it successfully redirects to
Address_insert.php
Please Assist. its my first day working with php and mssql
error_reporting(E_ALL);to the script I still don't get any errors