mysql concat和de-concat

I don't know well how to explain my problem...

This is my sql request :

SELECT DISTINCT CONCAT (nompropre, ' ', Auteur, ' de ', localite) AS auteur FROM Actes ORDER BY nompropre

It's results are passed on to a select in a form, showing things like this :

<option value=" seigneur de Witon"> seigneur de Witon</option>
<option value=" sénéchal de Hainaut"> sénéchal de Hainaut</option>
<option value=" voir-jurés de Tournai"> voir-jurés de Tournai</option>
<option value="Adalbéron évêque de Verdun">Adalbéron évêque de Verdun</option>
<option value="Adam évêque de Morinie">Adam évêque de Morinie</option>

The problem is that when that form is sent, it should result in the following sql query, where the last line of the above options is selected :

SELECT * FROM Actes, Bibliographie WHERE id = idBiblio AND nompropre = 'Adam' and Auteur = 'évêque' AND localite = 'Morinie';

I would need to de-concat the select options, knowing that both nompropre and/or localite could be empty strings...

Any clues... ?

Explode should do a task:

$str = ' seigneur de Witon';
$parts = explode (' ', $str);

echo '<pre>';
print_r($parts);

/*
    returns:
    Array
    (
        [0] => 
        [1] => seigneur
        [2] => de
        [3] => Witon
    )

    OR if the name is given:

    Array
    (
        [0] => Peter
        [1] => seigneur
        [2] => de
        [3] => Witon
    )
*/

SQL query will be:

$sql = "SELECT * FROM Actes, Bibliographie WHERE id = idBiblio " . (!empty($parts[0]) ? "AND nompropre = '" . $parts[0] . "'" : '') . " and Auteur = '" . $parts[1] . "' AND localite = '" . $parts[3] . "'";

PS: don't forget to sanitize data, use mysqli_real_escape_string function for the strings.