use this on the first SELECT :

    <select name="SELECT" onChange="window.navigate('<?=$PHP_SELF

when u choose an option the page will be refreshed and the $choice will be
available thru HTTP_GET_VARS["choice"]

all u have to do is check if the var exists and execute the second MySql
SELECT acording to the $choice

-----Mensagem original-----
De: Peter Goggin [mailto:[EMAIL PROTECTED]]
Enviada: terça-feira, 2 de Julho de 2002 2:00
Assunto: [PHP-DB] Linked tables and fields in a form

I have two related tables. The first has about 12 records, each of which is
related to about 12 records in the second table.  I want to have two
interconnectedt dropdown list fields. The fist is used to select from the
first table and when the value has been selected, use it to determine the
contents of the second drop down list.

Obviously I can do this by having interrelated pages where the value from
the first fiels is carried to the second page and used to populate the
second drop down list.

Is there any way of doing this so within a single page?


Peter Goggin

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to