<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php print $cek ["hit"]; ?></title>
</head>
<?php
include ("ayar.php");
//Burada ise GET ile gelen id'ye göre çekeceğimiz makaleyi sorguluyoruz.
$id=(mysql_real_escape_string(abs(intval($_GET['id']))));
$sorgu=mysql_query("SELECT * FROM makaleler WHERE id='$id'");
$hit_artis=mysql_query("UPDATE makaleler SET hit=hit+1 WHERE id='$id' ");
while ($cek=mysql_fetch_assoc($sorgu) )
{
echo $cek["baslik"];
echo "<br>";
echo $cek["makale"];
echo '<br>Bu makale '. $cek ["hit"]. ' kez okundu';
}
?><title><?php print $cek ["hit"]; ?></title>
Bu kod ile başlık göstermeyi deniyorum ancak
Kaynakta
<b>Notice</b>: Undefined variable: cek in <b>D:\PHP5\www\makale.php</b> on line <b>3</b><br />
Bu şekilde çıkıyor.
Hatayı nasıl giderebilirim?