Как создать динамическую страницу на mysqli?
<?php
$id = $_GET['id'];
?>
<!doctype html>
<html lang="en">
<head>
<title>CoffeeCols</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" href="styles.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="js/equalcolumns.js"></script>
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![ endif]-->
</head>
<body>
<header>
<h1>Быстрое к чаю и не только</h1>
</header>
<nav>
<ul>
<li class="selected">
<a href="index.php">Тортик вкусный</a></li>
<li><a href="bistroe-k-chay.php">Быстрое к чаю</a></li>
<li><a href="dobriy-sok.php">Добрый сок</a></li>
<li><a href="chay-pila.php">Чай пила</a></li>
<li><a href="skoriy-tortik.php">Скорый тортик</a></li>
<li><a href="pirog-prosto.php">Пирог просто</a></li>
</ul>
</nav>
<section id="intro">
<header>
<h2>Your Spiffy Tag Line Goes Here</h2>
</header>
<p></p>
<img src="images/introimage.png" alt="lime" />
</section>
<section id="content">
<?php include 'blocks/bd.php';?>
<?php
$stmt = $mysqli->query('SELECT * FROM `chay` WHERE id = `$id`');
// выводим данные
while($row = $stmt->fetch_assoc()){
echo '<ul class="column1">
<!--eqblock-->
<li>
<section class="block">
<a href="view-info.php"><img src="images/" alt="" />'.$row['zag'].'</a>
<h2><a href="#">'.$row['op'].'</a></h2>
<p></p>
</section>
</li>';
}
?>
</section>
<footer>
<section>
<h3>Left Stuff</h3>
<p>Left aligned text here. Proin metus odio, ultricies eu pharetra dictum, laoreet id odio. Curabitur in odio augue. Morbi congue auctor interdum. Phasellus sit amet metus justo.</p>
<p>Next line here</p>
</section>
<section>
<h3>Center Stuff</h3>
<p>Center Text here. Proin metus odio, ultricies eu pharetra dictum, laoreet id odio. Curabitur in odio augue. Morbi congue auctor interdum. Phasellus sit amet metus justo.</p>
<p>Next line here</p>
</section>
<section>
<h3>Right Stuff</h3>
<p>© 2010 <a href="#" title="your site name">yoursite.com</a> All rights reserved.</p>
<p>Center Text here. Proin metus odio, ultricies eu pharetra dictum, laoreet id odio. Curabitur in odio augue. Morbi congue auctor interdum. Phasellus sit amet metus justo.</p>
</section>
</footer>
</body>
</html>
выполнение этого:
<?php include 'blocks/bd.php';?>
<?php
if ( !isset($_GET['id']) || ( ( $id = (int)$_GET['id'] ) < 1 ) ) die("Error of ID");
$result = mysqli_query("SELECT * FROM `chay` WHERE id='$id'",$mysqli);
$myrow = mysqli_fetch_array($result);
?>
Дало ответ - Error of ID.
Подскажите,пожалуйста, как запустить