PHP Classes

MYSQL_linked_select

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  >  MYSQL_linked_select  >  (Un) Subscribe thread alerts  
Subject:MYSQL_linked_select
Summary:Problem with MYSQL_linked_select
Messages:8
Author:Alberto Pri
Date:2007-04-02 09:14:20
Update:2007-04-13 18:19:02
 

  1. MYSQL_linked_select   Reply   Report abuse  
Picture of Alberto Pri Alberto Pri - 2007-04-02 09:14:20
I've tried to access the form with linked select input, exactly the file test_mysql_linked_select.php

but when I enter nothing happens. I've modified the code to fit my database but nothing happens. Some suggestion

  2. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Alberto Pri Alberto Pri - 2007-04-02 13:27:38 - In reply to message 1 from Alberto Pri
Problem solved. bad sintax!

  3. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Alberto Pri Alberto Pri - 2007-04-02 15:55:51 - In reply to message 1 from Alberto Pri
New Problem and new question.

How can I make a linked_selection with a multiple selection input??

  4. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Alberto Pri Alberto Pri - 2007-04-04 08:17:16 - In reply to message 3 from Alberto Pri
And in the mysql_linked_select

what is the difference between groupsquery and optionsquery?

  5. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Alberto Pri Alberto Pri - 2007-04-04 10:44:20 - In reply to message 4 from Alberto Pri
How could I get the values of the select_input, the right side values.

Here's an example because I'm not explaining it very well

In the test_linked_select.php file we make a select input with this values:

$countries=array(
""=>array(
""=>"Select country",
),
"na"=>array(
""=>"Select country",
"us"=>"United States",
"ca"=>"Canada"
)......
}

In the example if I choose USA, when the form is submitted you show the
right side value "United States" calling the function
$country=$form->GetInputValue("countryt");

But I really need the left value, that is "us".

Any suggestion?? Thx

  6. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-04-13 18:13:09 - In reply to message 3 from Alberto Pri
Just specify MULTIPLE in the target linked select input.

  7. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-04-13 18:15:25 - In reply to message 4 from Alberto Pri
That is explained in the documentation.

OptionsQuery is an SQL query string that should be executed to retrieve the list of options for a given group.

GroupsQuery is an SQL query string that should be executed to retrieve the list all groups.

  8. Re: MYSQL_linked_select   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-04-13 18:19:02 - In reply to message 5 from Alberto Pri
No, GetInputValue gets the country codes, not the country names.

In the example it is displayed the country name by looking at $countries array.