PHP Classes

Problem form_mysql_linked_select_class

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  Problem form_mysql_linked_select_class  >  (Un) Subscribe thread alerts  
Subject:Problem form_mysql_linked_select_class
Summary:Options query dont get data from Linked Input
Messages:16
Author:Osvaldo Prado
Date:2008-05-01 14:10:06
Update:2009-08-22 07:37:55
 
  1 - 10   11 - 16  

  11. Re: Problem form_mysql_linked_select_class   Reply   Report abuse  
Picture of Joaquim Santo Joaquim Santo - 2009-08-19 09:52:13 - In reply to message 2 from Manuel Lemos
Hi,

your cascade dropdown menus are the best implementation I've seen.
However, if the first dropdown is not a static selection (as illustrated in the example) I have seriously problems to understand how to put it working.

In resume, two dropdown menus, both based on mySQL option retrievables.

Can you give me an example. The tutorial is poor.

Cheers
Joaquim

  12. Re: Problem form_mysql_linked_select_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-08-19 19:03:24 - In reply to message 11 from Joaquim Santo
I think you always depart from a static number of options. If this is not what you want, you need to tell me how do you expect that the first select input gets the value of the group of options to display.

  13. Re: Problem form_mysql_linked_select_class   Reply   Report abuse  
Picture of Joaquim Santo Joaquim Santo - 2009-08-20 08:34:41 - In reply to message 12 from Manuel Lemos
The first dropdown is Categories, the second one is Items and both are dynamic (new values can be inserted or removed anytime).

When I say dynamic I mean based on a mySQL query.

If not possible, the possible solution I can see is to use a first dropdown with the status (open or close). In fact I just want to show the Categories that are open at a given time.

Cheers
Joaquim

  14. Re: Problem form_mysql_linked_select_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-08-20 10:39:37 - In reply to message 13 from Joaquim Santo
If the first select input is just one group of options, all you need to do is to query your database on the server side and pass an associative array to a regular select input.

  15. Re: Problem form_mysql_linked_select_class   Reply   Report abuse  
Picture of Joaquim Santo Joaquim Santo - 2009-08-22 07:32:34 - In reply to message 14 from Manuel Lemos
Thanks Manuel. This exactly what I'm trying to do. Probably I'm misunderstanding something. An example from your side would be appreciated (if you have time).

Thanks in Advance
Joaquim

  16. Re: Problem form_mysql_linked_select_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-08-22 07:37:55 - In reply to message 15 from Joaquim Santo
Just use as basis the example supplied with the class. The only thing you need to do is to query your database to build the $continents array instead of using fixed values as in this script.

 
  1 - 10   11 - 16