MYSQL - PHP simple connect function

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.