I'm trying to add a row into another database and have now tried several way but am continuously getting an error. The latest way is:
$hostDb='mysql:host= "localhost";dbname="EMS" ';
$user='xxxxxx';
$password='xxxxxx';
$connection = PDO($hostDb, $user, $password);
$query = "INSERT INTO SCentre (SC_SR_name, SC_date) values (".$values[SR_name]."',',curdate())";
$result=$connection->$query;
But unfortunately I get the error:
Fatal error: Call to undefined function PDO() in /volume1/web/em_dev/include/Support_Request_events.php on line 67
Can anybody help Please?