Jump to content

[SOLVED] Select from database using data from the database


patrickm

Recommended Posts

Being new to the world of PHP and MySQL,
I have a problem for which I can't think of an answer.

At the moment I am creating a website on which there will be a database with several companies in it.
What I want to create is a dropdown selectionmenu (using < s e l e c t > and < o p t i o n >) with all cities from the companies on the database in it.

But the problem is that several different companies are located in the same city.
So using SELECT from the cities-table will result in a (faulty) list with double/triple cities on it.
My question: how do I select and sort out the cities and create a list on which each city is listed only once?

Any help would be more than welcome  8)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.