You can't.
PHP run server side so, if you want to change B according to A, you must do a refresh, or, fill B with Javascript. Javascript is a client side language.
To do a fill with JS, you must load everything in B to the JS, and then, when you pick the value from A, you fill B with the data you already got from the load of the page. That's not a good policy. The best way is changing A, you do a form submit and then you fill B.
Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com