Connecting php with ms sql server
$host="localhost"; \\name of the web server
$user="adeel"; \\username of ms sql server will come here
$pass="yourpassword"; \\password of ms sql server will come here with respect to username
$db_name="yourdatabase"; \\name of your database will come here
mssql_connect("$host","$user","$pass") or die("cannot connect to the database server");
mssql_select_db("$db_name") or die("cannot select the database");
save this code and give name to the php file such as conn.php and include in every file where which u want database interaction.
Labels: ms sql server, php
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment