Advertisement
Guest User

Untitled

a guest
May 13th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. <?php
  2. function webARX_connect_to_db(){
  3. $servername = "remote_host";
  4. $username = "username";
  5. $password = "password";
  6. $dbname = "database_name";
  7.  
  8. // Create connection
  9. $webARX_connection = new wpdb($username, $password, $dbname, $servername);
  10.  
  11. if (empty($webARX_connection->show_errors())){
  12. return $webARX_connection;
  13. } else {
  14. return $webARX_connection->show_errors();
  15. }
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement