How to connect to a SQL Server database to the webpage?

By: Jay Bankar | 30 May 2019


Sonu Rana

03 March 2020

A structured query language (SQL) is a powerful tool for connecting to many database systems that store data in tables organized into rows and columns.


SQL the most popular database tool in the world, including some of Oracle's database systems, MySQL, PostgreSQL, and Microsoft's SQL Server. The common commands in the SQL language like 

  • "SELECT" (The SELECT statement is used to extract data matching some criteria from the database), 
  • "INSERT" (The INSERT statement is used to add new rows to the database),
  • "UPDATE" (The UPDATE statement is used to update existing records in place).

Connection Command in PHP Script







// Create connection

$mysql = mysql_connect($host, $username, $password) or die("cannot connect");


$sql='SELECT * FROM $tbl_name';



0 votes

Your Answer

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at ""

© 2021 GDATAMART.COM (All Rights Reserved)