合并url中的2个输入值

I have form like this:

<form action="" method="get">
Color: <input type="text" name="color"><br>
Car: <input type="text" name="car"><br>
<input type="submit">
</form>

When i type color "red" and car "bmw" i get url like this

http://mywebsite/?color=red&car=bmw

how can i get car array into color on submit so that it would be like this

http://mywebsite/?color=red+bmw

I don't really know of a way to modify the HTML form to produce that query string from two separate inputs. But in the PHP script that handles the form submission, the URL you're trying to get is basically the equivalent of this:

$_GET['color'] = implode(' ', $_GET);
unset($_GET['car']);

This will change $_GET to

array (size=1)
  'color' => string 'red bmw' (length=7)

as if you had submitted to

http://mywebsite/?color=red+bmw