Click to See Complete Forum and Search --> : List language speakers


DanUK
02-04-2007, 12:31 PM
Hi there.

I'm trying to create a page which will have a dropdown menu of many, many languages and when submitted, will list all people who speak that language.

This may be stored in the database as "native" (native language) or "other" (other language).

At the moment, we have this code repeated for about 50 different languages (obviously not the best way) and hoped you can help us achieve the above where we just have the select menu, and only to show results when that's submitted.

Addtionally, we want to do the same for country (which is only stored as 'country' in the database). Would it be ok to have the two select menus on one page to be submitted?

Current code:


<table class="forms" cellpadding="5" cellspacing="0">
<tr class="bluetop">
<td colspan="3" class="titletext center"><label class="pagetitle1"><strong>Language Finder</strong></label></td>
</tr>

<tr class="nav">
<td><strong>Language</strong></td>
<td><strong>Speakers</strong></td>
</tr>

<tr onmouseover="this.bgColor='#bbddff'" onmouseout="this.bgColor='#f0f0f0'">
<td class="details"><strong>Afrikaans</strong></td>
<td class="details"><?php
$list = array();
$users=mysql_query("Select * from user where native=Afrikaans or other=Afrikaans order by account");
while ($user=mysql_fetch_array($users))
{
$list[] = '<a href="/roster/index.php?name='.$user['account'].'" title="'.$user['account'].'\'s Profile">'.$user['account'].'</a>';
}
echo implode(', ', $list); ?></td>
</tr>
</table>


Many thanks!

bokeh
02-04-2007, 01:27 PM
Hi there.

I'm trying to create a page which will have a dropdown menu of many, many languages and when submitted, will list all people who speak that language.How will you know they are telling the truth?

DanUK
02-04-2007, 01:28 PM
Hi bokeh :) thanks for your reply.

The languages are only for staff members, not anyone who wishes to register - so they're all accurate.

DanUK
02-05-2007, 06:39 PM
any ideas? :)

DanUK
02-09-2007, 06:03 PM
Hey, still having problems with this - any help would be appreciated :)