<?php
##################
$db_link=mysql_connect("localhost","user","pass");
$db_name='db_name';
##################
if($do=='del')
{
$result_del_adresse=mysql_db_query("$db_name","DELETE FROM adressen WHERE id='$id'", $db_link);
)
##################
print '
<HTML>
<HEAD>
<TITLE>Adressenverwaltung</TITLE>
<HEAD>
<BODY>
<TABLE>
<TR>
<TD><B>Vorname</TD>
<TD><B>Nachname</TD>
<TD><B>Strasse</TD>
<TD><B>PLZ</TD>
<TD><B>Ort</TD>
<TD><B>Aktion</TD>
</TR>
';
##################
$result_adressen=mysql_db_query("$db_name","SELECT * FROM adressen WHERE 1 ORDER BY nachname", $db_link);
while($Adresse=mysql_fetch_array($result_adressen))
{
print "
<TR>
<TD>$Adresse[vorname]</TD>
<TD>$Adresse[nachname]</TD>
<TD>$Adresse[strasse]</TD>
<TD>$Adresse[plz]</TD>
<TD>$Adresse[ort]</TD>
<TD><A HREF="adressen.php?do=del&id=$Adresse[id]"><IMG SRC="button.gif"></A></TD>
</TR>
";
}
##################
print '
</TABLE>
</BODY>
</HTML>
';
##################
?>