Re: Basic PHP/HTML code question

From: Date: Wed, 18 May 2005 14:32:50 +0000
Subject: Re: Basic PHP/HTML code question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-215475@lists.php.net to get a copy of this message
Carlos Palomino wrote:
Hi, I have been trying to write or find a pre-written script of a combo-box which would allow one to select a category from one drop-down list, then be given related options within a secondary list before clicking a submit button. Is there anyone who knows where I can find this or an easy way to accomplish this in PHP? Sorry if this is a basic question but I have only begun learning coding PHP so some items are foreign at this point. Thanks for your understanding and any assistance.
PHP executes on the server, so you have to send the form to the server. The easiest way I know of to do this is to add onChange="document.<formname>.submit();" to the <select> tag (obviously, change <formname> to the name of the form in question. When the form reloads, use the selected item in the first combo box to select the items to fill the second combo box. ---Michael

« previous php.general (#215475) next »