xxxxxxxxxx
<?php
// Assuming you have established a connection to the MSSQL database
// Prepare the SQL query for insert
$sql = "INSERT INTO your_table (column1, column2, column3) VALUES (?, ?, ?)";
$parameters = array($value1, $value2, $value3); // Replace with actual values
// Execute the query
$stmt = sqlsrv_query($conn, $sql, $parameters);
if ($stmt === false) {
// Error handling
die(print_r(sqlsrv_errors(), true));
}
else {
// Trigger should be automatically executed after successful insert
echo "Data inserted successfully!";
}
// Close the statement and connection
sqlsrv_free_stmt($stmt);
sqlsrv_close($conn);
?>