Merhaba Bir Veri Güncellemek İstiyorum.. Ama Beceremedim..

Örneğin:
AAA yı BBB yapmak istiyorum..

<?php
include 'baglan.php';
?>



<?php


try {
$dbpdo = new PDO("mysql:host={$host};dbname={$dbismi}", $dbkullanici, $dbsifre, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$dbpdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );
} catch (PDOException $e) {
return 'Baglanti hatasi '. $e->getMessage();
}


$query = $db->prepare("UPDATE Travel SET
Arama_Kelimesi = :yeni
WHERE Arama_Kelimesi = :eski");
$update = $query->execute(array(
"yeni" => "BBB",
"eski" => "AAA"
));
if ( $update ){
print "güncelleme başarılı!";
}

?>

Aldıgım Hata..

Fatal error: Call to a member function prepare() on null in /home/domainuser/public_html/dosya/test/index.php on line 23

baglan.php


<?php
    $host = "localhost";
    $dbismi = "dbbbbbbbb"; // Database ismi
    $dbkullanici = "userrr"; // Database kullanici adi
    $dbsifre = "sifreemm"; // Kullanici sifresi
  ?>