Using PHP form to insert geometry from WKT and SRID into SQL Server 2017
The answer was provided by Zhorov in Stack Overflow here

Reposting the answer here in the hopes it will benefit someone:

You should include geometry::STGeomFromText in your T-SQL statement and bind the value for $wkt parameter without using PDO::quote:

&lt;?php
    if ($_SERVER['REQUEST_METHOD']=="POST") {
        $wkt = $_POST['wkt'];
        $srid = $_POST['srid'];
        $name = $_POST['name'];
        try {
            $sql = "
               INSERT INTO Upload_WKT_Test (Name, GeomCol1) 
               VALUES (:name, geometry::STGeomFromText(:wkt, :srid))";
            $stmnt = $pdo-&gt;prepare($sql);
            $theData = [':name'=&gt;$name, ':wkt'=&gt;$wkt, ':srid'=&gt;$srid];
            $stmnt-&gt;execute($theData);
        } catch(PDOException $e) {
            echo "Error: ".$e-&gt;getMessage();
        }
    } else {
        $wkt="";
        $alignment="";
        $srid="";
    }
?&gt;