Don't do $rs = mysqli_fetch_array($result);
on top. This already reads out the first row (8417). Instead use $result->num_rows
:
echo '<form><select size="1" name="ddKfz" class="dropID" onchange="ddChange(this.form)">';
if($result->num_rows < 1) {
echo "<option selected value='0' style='color:#cc0000'>Empty!</option>";
…
A few extra points to consider:
- Don't use
$_REQUEST
, use$_POST
instead, and sanitize the data! - You don't need
mysqli_data_seek($result, 0);
-value='" . $rs["id"] . "'selected
is missing a space beforeselected
(this might be why 8417 doesn't show up in the browser anymore)