Posted By

ginoplusio on 01/25/10


Tagged

mysql php connect


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

ginoplusio
esritter


MYSQL - PHP simple connect function


 / Published in: PHP
 

URL: http://www.barattalo.it/2010/01/25/10-php-usefull-functions-for-mysql-stuff/

  1. function connectDb() {
  2. // connect and set the
  3. // working db
  4. if (mysql_connect( DBHOST, DBUSER, DBPWD ) && mysql_select_db( DBNAME )) return true; else return false;
  5. }

Report this snippet  

You need to login to post a comment.