Create connection file in php

connection file is used to connect DB with web application.

//                                          Code                                         //



<?php

define ("db-host", "localhost");
define ("user-name", "root");
define ("password", "");
define ("database", "database name");

$link=mysql_connect("localhost","root","") or die ("errror");

$db=mysql_select_db("database name", $link)or die ("errror");

?>

Comments

Popular posts from this blog

How to filter data from database according to client name & date wise in PHP

Captcha Code In PHP