<?php
include 'config.php';
if ($_SERVER['REQUEST_METHOD'] == 'Submit')
{
$query = 'UPDATE auto SET merk='.$_POST['merk'].' where id='.$_GET['id'].'';
}
else {
$select="SELECT * from auto where id='".$_GET['id']."'";
?>
<FORM NAME="toevoegen" METHOD="post" ACTION="wijzig.php" enctype="multipart/form-data">
<table border="0" width="43%">
<tr>
<td width="123">Merk::</td>
<td><input type="text" name="merk" size="20" value="<?=$list->merk;?>"></td>
</tr>
<tr> a
<td width="123">Type:</td>
<td><input type="text" name="type" size="20" value="<?=$list->type;?>"></td>
</tr>
<tr>
<td width="123">Bouwjaar:</td>
<td><input type="text" name="bouwjaar" size="20" value="<?=$list->bouwjaar;?>"></td>
</tr>
<td width="123">Bouwmaand:</td>
<td><input type="text" name="bouwmaand" size="20" value="<?=$list->bouwmaand;?>"></td>
</tr>
</tr>
<tr>
<td width="123">KM-Stand:</td>
<td><input type="text" name="kmstand" size="20" value="<?=$list->kmstand;?>"></td>
</tr>
<tr>
<td width="123">Kleur:</td>
<td><input type="text" name="kleur" size="20" value="<?=$list->kleur;?>"></td>
</tr>
<tr>
<td width="123">Brandstof:</td>
<td><select name="brandstof">
<option value="Benzine">Benzine</option>
<option value="Gas">Gas</option>
<option value="Diesel">Diesel</option>
</select>
</td>
</tr>
<tr>
<td width="123">Aantal-Deurs:</td>
<td><input type="text" name="aantaldeurs" size="20" value="<?=$list->aantaldeurs;?>"></td>
</tr>
<tr>
<td width="123">Transmissie:</td>
<td><select name="transmissie value="<?=$list->transmissie;?>"">
<option value="Handgeschakeld">Handgeschakeld</option>
<option value="Automaat">Automaat</option>
</select>
</td>
</tr>
<tr>
<td width="123">Prijs:</td>
<td><input type="text" name="prijs" size="20" value="<?=$list->prijs;?>"></td>
</tr>
<tr>
<td width="123">Extra's:</td>
<td><textarea rows="4" name="extra" cols="20" value="<?=$list->extra;?>"></textarea></td>
</tr>
</table>
<input type="Submit" value="Submit" name="Submit">
<input type="Reset" value="Reset" name="Reset">
</form>
<?php
}
}
?>