In this Post We will See how to give connection to database in php
<?php
$host = 'hostname';
$user = 'username';
$pass = 'yourpassword';
$conn = mysql_connect($host, $user, $pass);
if(! $conn )
{
exit('Not connected: ' . mysql_error());
}
echo 'Connection Established successfully';
mysql_close($conn);
?>
11:25
Share:
0 comments: