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); ?>

  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

How to Solve My Website Page Not Found Error?

Solution Troubleshooting guideIf you have already signed up for a hosting account with us,...

Your Control Panel (cPanel) Video Tutorials

Solution You will be a pro in no time with cPanel's video tutorials. These tutorials allow you...

How to enable register_globals?

Solution Some softwares requires Register_globals to be on. The server global option as part...