/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function connectDb() { // connect and set the // working db if (mysql_connect( DBHOST, DBUSER, DBPWD ) && mysql_select_db( DBNAME )) return true; else return false; }
URL: http://www.barattalo.it/2010/01/25/10-php-usefull-functions-for-mysql-stuff/