You are here: Re: [PHP] Basic PHP/HTML code question « PHP « IT news, forums, messages
Re: [PHP] Basic PHP/HTML code question

Posted by tg-php on 10/20/44 11:16

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация