Not exactly what you need but...
you have:
<select name="inBox" multiple size=3><option name="1">Hello mum</option><option name="2">Hello Dad</option><option name="1">Hello Brother</option></select>
change to
<select name="inBox[]" multiple size=3><option value="1">Hello mum</option><option value="2">Hello Dad</option><option value="3">Hello Brother</option></select>
Say you select
Hello Mum
Hello Brother
Then php will have $inBox available with the following array values
$inBox[0]=1
$inBox[1]=3
Hope it helps, apply that to outBox and things should work supposing your javascript leaves the entries selected.
Saludos
Gerardo