[snip] I have 2 list fields in a form. The second is populated basing on selection in field 1. Can anyone pls tell me how to do this in PHP ? [/snip]
you can't, onchange is fired with javascript on the client. You have a number of ways you can do it a few are. 1. have on change submit the form to a php page, grab the form variable from the first drop down and build the second select box. 2. if the data set is small, output it all to the page as javascript arrays, then onchange, rebuild the second drop down box. 3. take a look at http://developer.apple.com/internet/javascript/iframe.html these are just a few options. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php