<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>БД Гостинницы</title>
</head>
<body>
"<table border=1>
<caption>Таблица:Клиенты</caption>
<tr>
<th>ФИО</th>
<th>Паспортные данные</th>
<th>Дата заселения</th>
<th>Дата выезда</th>
<th>Номер комнаты</th>
<th>Услуга №1</th>
<th>Услуга №2</th>
<th>Услуга №3</th>
<th>Стоимость</th>
<th>Номер сотрудника</th>
</tr>";
<tr>
<form method='post' action='add.php' >
<td><input type='text' size='40' name='fio'></td>
<td><input type='text' size='20' name='pasport_dan'></td>
<td><input type='text' size='15' name='data_zaceleniy'></td>
<td><input type='text' size='15' name='data_vuezda'></td>
<td><input type='text' size='20' name='id_nomera'></td>
<td><input type='text' size='10' name='id_yslugi1'></td>
<td><input type='text' size='10' name='id_yslugi2'></td>
<td><input type='text' size='10' name='id_yslugi3'></td>
<td><input type='text' size='20' name='stoimost'></td>
<td><input type='text' size='20' name='id_sotrudnica'></td>
<td><input type='submit' value='Добавить'></td>
</form>
</tr>
<?php
mysql_connect("localhost","admin","admin123");
mysql_select_db("bd_gostinici");
$result=mysql_query("SELECT * FROM `klientu`");
while($row=mysql_fetch_array($result)){
print "<tr>
<td>".$row['fio']."</td>
<td>".$row['pasport_dan']."</td>
<td>".$row['data_zaceleniy']."</td>
<td>".$row['data_vuezda']."</td>
<td>".$row['id_nomera']."</td>
<td>".$row['id_yslugi1']."</td>
<td>".$row['id_yslugi2']."</td>
<td>".$row['id_yslugi3']."</td>
<td>".$row['stoimost']."</td>
<td>".$row['id_sotrudnica']."</td>
<td><a href='form.php?fio=".$row['fio']."'><input type='submit' value='Удалить'></a></td>
</tr>";
}
?>
</table>
</body>
</html>
форма добавления
<?php
mysql_connect("localhost", "admin","admin123");
mysql_select_db("bd_gostinici");
mysql_query("INSERT INTO `klientu` ('fio', 'pasport_dan', 'data_zaceleniy', 'data_vuezda','id_nomera', 'id_yslugi1', 'id_yslugi2', 'id_yslugi3',
'stoimost','id_sotrudnica') VALUES (NULL, '".$_POST['fio']."',
'".$_POST['pasport_dan']."', '".$_POST['data_zaceleniy']."',
'".$_POST['data_vuezda']."', '".$_POST['id_nomera']."',
'".$_POST['id_yslugi1']."', '".$_POST['id_yslugi2']."',
'".$_POST['id_yslugi3']."', '".$_POST['stoimost']."',
'".$_POST['id_sotrudnica']."');");
header("Location:klientu.php");
?>