Try{$db=new PDO("mysql:host=localhost;dbname=veritabani;charset=utf8","root","");
}
catch(PDOException $i)
{
die("Veritabanı bağlantı hatası ".$i->getMessage());
}
if(isset($_GET)&& !empty($_GET["icerik_id"]))
{
$sor=$db->prepare("SELECT * from mak_begen where user_id=:uid and icerik_id=:pid");
$sor->execute(array("pid"=>$_GET["icerik_id"]));
if($sor->rowCount()>0)
{
print_r($sor->fetch(PDO::FETCH_ASSOC));
}
else{
Echo $_GET["icerik_id"]." id içerik yok";
}}
else{ echo "veri gönderilmedi";}