Web Hosting

Singapore Web Hosting

With 24/7 Super Support
Web Hosting Singapore Blog    Web Hosting Singapore Contact Us    Web Hosting Singapore Client Login
Singapore Dedicated Web Hosting
Email: Call: +65 6288-6264
 
Support Center » Knowledgebase » How to test MySQL connection?

Web hosting Knowledge Base/FAQ

 How to test MySQL connection?
Solution <?php
$connection= mysql_connect('hostname','dbuser','dbpassword');
if (!$connection) {
die('Could not connect to MySQL: ' . mysql_error());
} else {
echo 'Connection OK';
}
mysql_close($connection); ?>


Article Details
Article ID: 68
Created On: 22 Jul 2009 05:23 PM

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options

 

Singapore Web Hosting With A Difference - Click To Read More...
Singapore Web Hosting With A Difference - Click To Read More...