How to set database connectivity in PHP?
How to set database connectivity in PHP?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
KalaiPosted Mar 20, 2014, 9:55 AM
//Servername , username , password
$connection = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$connection) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($connection);
?>
Posted Mar 20, 2014, 9:10 AM
Visit this link may help you
http://www.w3schools.com/Php/php_mysql_connect.asp
Please accept, if it helpful to you