Hi guys (and sorry for my lazy english^^) ! I want a SELECT for a searchform to search (example) with zipcode 1234 for john doe. but when i search for john doe with 1234 the result is a customer with customerid like 1234, too. thats not good, but i am think, i am on the right way. How can i fix it ? Okay, so here is my beginners code and i hope you can laugh a little bit and you can help my to code this to a that what i am looking for. :D Thank you so much, Guys !!
<table class="table table-striped" >
<p>
<tr>
<th>Kundennummer</th>
<th>Reklamationsnummer</th>
<th>Firma</th>
<th>Nachname</th>
<th>Vorname</th>
<th>Straße</th>
<th>Nr</th>
<th>Plz</th>
<th>Ort</th>
<th>Telefon</th>
<th>Mail</th>
<tr>
<?php
error_reporting(-1);
ini_set('display_errors', true);
include "config.php";
$kdnr = mysqli_real_escape_string($mysqli, $_GET['kdnr']);
$reklamationsnummer = mysqli_real_escape_string($mysqli, $_GET['reklamationsnummer']);
$firma = mysqli_real_escape_string($mysqli, $_GET['firma']);
$nachname = mysqli_real_escape_string($mysqli, $_GET['nachname']);
$vorname = mysqli_real_escape_string($mysqli, $_GET['vorname']);
$street = mysqli_real_escape_string($mysqli, $_GET['street']);
$hausnummer = mysqli_real_escape_string($mysqli, $_GET['hausnummer']);
$postleitzahl = mysqli_real_escape_string($mysqli, $_GET['postleitzahl']);
$ort = mysqli_real_escape_string($mysqli, $_GET['ort']);
$telefon = mysqli_real_escape_string($mysqli, $_GET['telefon']);
$mail = mysqli_real_escape_string($mysqli, $_GET['mail']);
$result = $mysqli->query("SELECT kdnr, reklamationsnummer, firma, nachname, vorname, street, hausnummer, postleitzahl, ort, telefon , mail
FROM kundentest
WHERE
kdnr = '".$kdnr."' XOR
reklamationsnummer = '".$reklamationsnummer."' XOR
firma = '".$firma."' XOR
nachname = '".$nachname."' XOR
vorname = '".$vorname."' XOR
street = '".$street."' XOR
hausnummer = '".$hausnummer."' XOR
postleitzahl = '".$postleitzahl."' XOR
ort = '".$ort."' XOR
telefon = '".$telefon."' XOR
mail = '".$mail."' ");
while ($row = $result->fetch_assoc()):
?>
<tr>
<td><?php echo $row['kdnr']; ?></td>
<td><?php echo $row['reklamationsnummer']; ?></td>
<td><?php echo $row['firma']; ?></td>
<td><?php echo $row['nachname']; ?></td>
<td><?php echo $row['vorname']; ?></td>
<td><?php echo $row['street']; ?></td>
<td><?php echo $row['hausnummer']; ?></td>
<td><?php echo $row['postleitzahl']; ?></td>
<td><?php echo $row['ort']; ?></td>
<td><?php echo $row['telefon']; ?></td>
<td><?php echo $row['mail']; ?></td>
</tr>
<?php
endwhile;
?>
</table>
<table>
<tr>
<th><a class="btn btn-info" href="index.php" role="button">zurück zur Suche</a></th>
</tr>
</table>