There's a couple of approaches you can take here, for example your BOTH value could be Pete' OR driver='Julia Please note how the single quotes are arranged rather oddly, so that it makes sense once the sql clause is constructed. But please please don't do that! your code allows SQL injection and that's not something anyone should allow - too many commercial sites are prone to sql injection and we all need to make sure we never allow that to happen in our code.
So, I have to say (and will probably say this over and over again in this forum!) that you should never take the submission from the form and use it directly in your SQL string. Instead, use parameterised queries. Using non-parameterised queries (i.e. joining together strings that use form-submitted values to construct a SQL phrase) is a big no-no for security reasons (sql injection). Instead, you would store the values posted by your form in the SQL parameter variables, and the first two possibilities (i.e. just Julia or just Pete) will simply be WHERE `driver` = ? and then the parameter that you pass to your SQL will occupy the ? slot without having any worries about SQL injection. (by the way, this also allows for names such as O'Connor without worrying about apostrophes that would otherwise break your code - parameterised queries really are the way to do ALL sql processing).
Anyway that leads us to the third possibility, i.e. "either name". To answer that, have your HTML value equal to "BOTH" and then in your php code say something like if ($driver === "BOTH") and construct your (parameterised) sql accordingly, i.e. with a sql statement that says WHERE Driver IN (?,?) and pass the sql statement two parameters, one for each name you are looking for.
So having got this far, I then have to say the previous advice can be improved upon because it is too deeply coupled to the form, that is to say your backend code relies on the form having just two names and the "BOTH" option, so you'd then want to add refinement to your handling of the form submission so that "BOTH" is actually much more flexible, in case you later added a third or fourth name. So instead of having "BOTH" in the value for the form field, have perhaps "Pete,Julia" as the value for the form field, and then get your php script to explode that on the comma delimeter, and you end up with a nice array of people's names. I find myself building parameterised SQL phrases by putting as many question marks in the sql string as there are elements of the array, and passing the array of values as the sql parameters. That way, you can have as many names as your form submits in the "Both" field, although with three or more names it'll be an "Any" field. What you really need to aim for is to totally decouple the form and the backend php code, so that the php code can handle any number of options on the form.
I hope that explains things.