I am trying to connect with another database in WordPress and insert data into a new table. I am creating a new object of wpdb
$newconnection= new wpdb("localhost","username","password","databasename");
and then trying to insert the data:
$newdb->insert('tablename', array('fullname'=> $_REQUEST['fullname'],'email'=> $_REQUEST['email']);
but i am not able to insert the data into new table of the new database.
its showing the error "ERROR ESTABLISHING A DATABASE CONNECTION".
Please try to resolve my query