Re: Basic PHP/HTML code question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since PHP is server-side, it's probably not the best option for doing what you're describing.  It IS possible to use a javascript "onchange" event and use that to trigger a new page load which would change your second select box, but that's kind of slow and sloppy and should probably only be used when your select boxes have a LOT of data or can change a lot necessitating a database lookup on whatever you selected in the first box.

It sounds like what you want to do would best be done in javascript totally.   Use PHP to build the javascript code that has all the options and then use code like the stuff found in Example 1 on:

http://www.mattkruse.com/javascript/dynamicoptionlist/


Technically this message is "off topic" and I'm sure someone will say something about it, but I hope people remember when they were starting out in PHP and weren't sure what it could and couldn't do and remember that asking questions like this is part of the learning process.

Best of luck Carlos!

-TG




= = = Original message = = =

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.

C.


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux