If you want to make it truly relational, you actually have a complex table structure to build. Assuming you have the following data to track:
Make
Model
Type
Year
Color
You need the following tables:
Cars Brands Makes Models ModelColors Colors
----------- -------- ------- ------- ----------- ------
VIN ID ID ID Model_ID ID
Brand_ID Brand Make Model Color_ID Color
Make_ID Brand_ID Make_ID
Model_ID
Color_ID
There may be more data you need, but that should basically give you an idea of how the data should be put together. You would need to enforce referential integrity between Primary and Foreign keys, for example the brand table's ID and the makes table's Brand_ID field. Models and Colors have a many-many relationship, so the ModelColors tables acts as the connector. In that case, Model_ID and Color_ID together make up the primary key there.
Can you see how the relationship works? If you don't understand relational tables, you should learn before you move much further on this. You can start here.
Now... as far as your code goes, change it to look something like this. Code is untested, but should get you moving in the right direction:
// db connect
mysql_connect($dbhost, $loginname, $loginpass) or die("Could not connect");
mysql_select_db($dbname);
?>
<form method="POST" name="form_merk" action="auto.php">
<select size="1" name="merk" onchange="form_merk.submit();">
<option value="none">selecteer merk</option>
<?php
$car1 = "SELECT * FROM v_cars ORDER By merk";
$geefcar1 = mysql_query($car1);
while ($ne1 = mysql_fetch_array($geefcar1)) {
if ($merk==$ne1['merk']) {
$merkunique[$ne1['merk']] = 1; // this is our selected $merk
} else {
$merkunique[$ne1['merk']] = 0;
}
}
foreach ($merkunique as $key=>$value) {
echo '<option value="'.$key.'"';
echo ($value===1)?' selected="selected"':'';
echo '>$key</option>';
}
?>
</select>;