Вот код:
<?php
include ("includes/bd.php");
?>
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<meta name="description" content=" ">
<meta name="keywords" content=" ">
<link rel="stylesheet" type="text/css" href="includes/style.css" />
<title>Страница добавления нового фильмма</title>
</head>
<body>
<?php include ("includes/header.php"); ?>
<?php include ("includes/nav.php"); ?>
<div id="content">
<?php
if (!isset($id))
{
$result = mysql_query("SELECT name,id FROM films");
$myrow = mysql_fetch_array($result);
do
{
printf ("<p><a href='edit_film.php?id=%s'>%s</a></p>",$myrow["id"],$myrow["name"]);
}
while ($myrow=mysql_fetch_array($result));
}
else
{
print <<<HERE
<form name="form1" action="update_film.php" method="post">
<p>
<label>Введите название фильма:<br>
<input type="text" name="name" id="name">
</label>
</p>
<p>
<label>Введите краткое описание фильма:</label>
<br>
<textarea name="description" id="description" cols="60" rows="15"></textarea>
</p>
<p>
<label>Введите полное описание фильма:</label>
<br>
<textarea name="text" id="text" cols="60" rows="30"></textarea>
<br>
<br>
<input type="submit" name="submit" id="submit" action="submit form" value="Добавить фильм">
</p>
</form>
HERE;
}
?>
</div><!-- End #content -->
<?php include ("includes/footer.php"); ?>
</body>
</html>