When developing this tutorial, we accessed SQL Server 2000–2019 and Express databases from PHP on UNIX and Linux. Connect PHP to SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017, SQL Server 2019 and SQL Server Express This tutorial shows you how to use ODBC to access remote SQL Server databases from PHP scripts running under the Apache web server. PHP includes ODBC support through its Unified ODBC database extension. PHP supports a number of database extensions that enable PHP scripts embedded within web pages to access data stored in relational databases and display the results. PHP is an open-source scripting language used to create database-driven web applications. Use PHP to retrieve output parameter values from your SQL Server stored procedures. Retrieve Procedure Output Parameters from PHP
Improve script portability by accessing SQL Server from PDO, PHP's object oriented data access abstraction layer. Connect PHP to SQL Server with PDO / PDO_ODBC Connect PHP to SQL Server with Unified ODBCĬonnect PHP to SQL Server by using PHP's Unified ODBC interface.