Sunday 31 December 2017

SQL Database Connection

How to Connect SQL Database :

To connect SQL Database through Php the complete code is as under:


<?php  mysql_connect("localhost","root","") or die("Connection Error");
mysql_select_db("database name") or die ("Database Error");
?>

Point to be noted:

1. Local host is the local main server name.

2.Root is the server name.
3."" the empty quote is password.


No comments:

Post a Comment