<html>
<body>
<?php
error_reporting(E_ALL);
$rowKeys = array('Userid', 'Vorname', 'Nachname','Firma','Email','Telefon','Telefon2','Laufzeit','PCLizenzen','Seriennummer','DatumAktiv','DatumEndAktiv');
$row = array_fill_keys($rowKeys, '');
$Host = "localhost";
$User = "david";
$Password = "a";
$dbname = "ABMC-Datenbank";
$tbl="Kunden";
mysql_connect('localhost', 'david', 'a') or die ("Keine Verbindung möglich: ".mysql_error());
mysql_select_db($dbname) or die ("Keine Verbindung möglich: ".mysql_error());
$sql = "SELECT * FROM {$tbl} WHERE Userid LIKE '" .mysql_real_escape_string($_POST["Userid"])."' OR";
$sql .= " Vorname LIKE '" .mysql_real_escape_string($_POST["Vorname"]) ."' OR";
$sql .= " Nachname LIKE '" .mysql_real_escape_string($_POST["Nachname"]) ."' OR";
$sql .= " Firma LIKE '" .mysql_real_escape_string($_POST["Firma"]) ."' OR";
$sql .= " Email LIKE '" .mysql_real_escape_string($_POST["Email"]) ."' OR";
$sql .= " Laufzeit LIKE '" .mysql_real_escape_string($_POST["Laufzeit"]) ."' OR";
$sql .= " PCLizenzen LIKE '" .mysql_real_escape_string($_POST["PCLizenzen"]) ."' OR";
$sql .= " Seriennummer LIKE '" .mysql_real_escape_string($_POST["Seriennummer"]) ."' OR";
$sql .= " DatumAktiv LIKE '" .mysql_real_escape_string($_POST["DatumAktiv"]) ."' OR";
$sql .= " DatumEndAktiv LIKE '" .mysql_real_escape_string($_POST["DatumEndAktiv"]) ."'";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($result);
?>
<table>
<tr><td>Userid </td>
<td>Vorname</td>
<td>Nachname</td>
<td>Firma</td>
<td>Email</td>
<td>Telefon</td>
<td>Telefon2</td>
<td>Laufzeit</td>
<td>PCLizenzen</td>
<td>Seriennummer</td>
<td>DatumAktiv </td>
<td>DatumEndAktiv</td>
</tr>
<?php
while($row = mysql_fetch_assoc($result))
{
?>
<tr>
<td><?php echo $row['Userid'];?></td>
<td><?php echo $row['Vorname'];?></td>
<td><?php echo $row['Nachname'];?></td>
<td><?php echo $row['Firma'];?></td>
<td><?php echo $row['Email'];?></td>
<td><?php echo $row['Telefon'];?></td>
<td><?php echo $row['Telefon2'];?></td>
<td><?php echo $row['Laufzeit'];?></td>
<td><?php echo $row['PCLizenzen'];?></td>
<td><?php echo $row['Seriennummer'];?></td>
<td><?php echo $row['DatumAktiv'];?></td>
<td><?php echo $row['DatumEndAktiv'];?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>