Page 1 of 1

Help needed please

Posted: Tue Jan 06, 2004 10:24 am
by HotaHota
I want to create a dropdown menu that will filter my database in this way:If I have a field in my table with cities and I want to find some infos from another field for one specific city ,how do i show the infos for that city only?
Thnx in advance guys...

Posted: Tue Jan 06, 2004 12:47 pm
by Weirdan

Code: Select all

select `some infos` from cities where city='$somevar'
Something like this. Depends on db and programming language used.

Posted: Tue Jan 06, 2004 1:06 pm
by scorphus
... and use a jump menu to fill this $someVar:
  • $someArray <- cities names;
  • use printSelect($someArray, 'cities', $_POST['cities'], 'onChange="javascript:document.form1.submit();"') to draw the jump menu.
Hope that helps,
Scorphus.

Posted: Wed Jan 07, 2004 9:12 am
by HotaHota
Thnx a lot guys you were very helpful :) :) :)