prepare('INSERT INTO person SET name = :name, surname = :surname, father_name = :father_name'); $sth->execute(array( ":name" => "Donald", ":surname" => "Trump", ":father_name" => "Moishovich")); foreach($dbh->query("SELECT * FROM person") as $row) { print_r($row); } $dbh = null; } catch (PDOException $e) { print "Error!: " . $e->getMessage() . "
"; die(); }