Kód souboru smaz_obyvatel_form.php pro opsání

<?php
echo"<html>
<head>
<meta http-equiv=\"Content-Language\" content=\"cs\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\">
<title>Registr obyvatel mého města</title>
</head>";

echo"<div align=\"center\">
<table border=\"0\" width=\"800\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td></td>
</tr>
</table></div>
<form method=\"POST\" action=\"smazat_obyvatele.php?volba=1\">
<div align=\"center\">
<table border=\"1\" width=\"800\" cellspacing=\"0\" cellpadding=\"0\" id=\"table1\" bordercolor=\"#000000\" style=\"border-bottom-width: 0px\">
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\"><b><font size=\"6\">Registr obyvatel mého města</font></b></td>
</tr>
<tr>

<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">&nbsp;</td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\">
<a target=\"_self\" href=\"http://www.pokuston2.borec.cz/novy_obyvatel.php\">Přidat nového obyvatele&nbsp;
</a> </td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">

<p align=\"center\">
<a title=\"Výpis všech obavatel netříděný\" target=\"_self\" href=\"vypis.php\">
Výpis všech oyvatel</a></td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">

<p align=\"center\">
Smazání vybraného obyvatele</td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\">
<a target=\"_self\" href=\"http://www.pokuston2.borec.cz/edit_obyvatel.php\">Změna obyvatele&nbsp;
</a> </td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\">
<a target=\"_self\" href=\"http://www.pokuston2.borec.cz/statistika.php\">Statistika&nbsp;
</a> </td>
</tr>
<tr>

<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">&nbsp;</td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\">&nbsp;</td>
</tr>
<tr>
<td width=\"800\" colspan=\"2\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\"><font color=\"#FF0000\">".$text_chyby."</font></td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<table border=\"1\" width=\"100%\" bordercolor=\"#000000\" id=\"table2\">
<tr>
<td width=\"10\">&nbsp;</td>
<td align=\"center\"><b>Jméno</b></td>
<td align=\"center\"><b>Příjmení</b></td>
<td align=\"center\"><b>Věk</b></td>
<td align=\"center\"><b>Zaměstnání</b></td>
<td align=\"center\"><b>Pohlaví</b></td>
</tr>";
$i=1;
for ($i; $i<=$num_vypis; $i++) //smyčka, která nám cykluje přesně tolikrát, kolik je záznamů v databázi
{
$vypis_data=mysql_fetch_array($data); //data jsme z databáze získali ve formátu pole, tímto příkazem je budeme postupně po jedné zobrazovat
echo"<tr>
<td align=\"center\"><input type=\"radio\" value=\"".$vypis_data['id_obyvatel']."\" checked name=\"id_obyvatel\"></td>
<td align=\"center\">".$vypis_data['jmeno']."</td>
<td align=\"center\">".$vypis_data['prijmeni']."</td>
<td align=\"center\">".$vypis_data['vek']."</td>
<td align=\"center\">".$vypis_data['zamestnani']."</td>
<td align=\"center\">".$vypis_data['pohlavi']."</td>
</tr>";
} //konec zobrazovací smyčky

echo"
</table>
</td>
</tr>

<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
&nbsp;</td>
</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium\">
<p align=\"center\"><input type=\"submit\" value=\"Potvrdit smazání\" name=\"B1\"></p></td>

</tr>
<tr>
<td width=\"800\" style=\"border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">&nbsp;</td>
</tr>
</table>
</div>

</form>";
?>