Monday, 18 August 2014

Database Connection in PHP&MYSQL

Posted by Unknown  |  No comments

             In this Post We will See how to give  connection to  database  in php
 $host = 'hostname';  
 $user = 'username';  
 $pass = 'yourpassword';  
 $conn = mysql_connect($host, $user, $pass);  
 if(! $conn )  
  exit('Not connected: ' . mysql_error());  
 echo 'Connection Established successfully';  

11:25 Share:


Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top