how to insert an id to a mysql table from a html select option

From: Date: Wed, 07 Nov 2001 11:46:40 +0000
Subject: how to insert an id to a mysql table from a html select option
Groups: php.db 
Request: Send a blank email to php-db+get-14084@lists.php.net to get a copy of this message
I would like to be able to fill a <select> option in a form with the town_name and send its corresponding id to a mysql table. Town Table Detail Table **************************** ************************ * town_id * town_name * * mem_id * town_id * **************************** ************************ * 1 * Wang * * 1 * 1 * * 2 * Albury * * 2 * 3 * * 3 * Yarra * ************************* **************************** I can fill the <select> options with the town_name from the mysql Town Table ok. what I would like to do is when the user selects the town say Wang, the associated id of 1 is inserted into the Detail Table, this then joins both tables by the town_id How may this be possible? Thanks Ivan

« previous php.db (#14084) next »