Example Application (SQLSRV Driver)

SQL Server 2008 R2

The AdventureWorks Product Reviews example application is a Web application that uses the SQLSRV driver of Microsoft Drivers for PHP for SQL Server. The application lets a user search for products by entering a keyword, see reviews for a selected product, write a review for a selected product, and upload an image for a selected product.

Running the Example Application

Install the Microsoft Drivers for PHP for SQL Server. For detailed information, see Getting Started.

Copy the code listed later in this document into two files: adventureworks_demo.php and photo.php.

Put the adventureworks_demo.php and photo.php files in the root directory of your Web server.

Run the application by starting http://localhost/adventureworks_demo.php from your browser.

The AdventureWorks Product Reviews example application returns product information from the database for products whose names contain a string entered by the user. From the list of returned products, the user can see reviews, see an image, upload an image, and write a review for a selected product.