Jump to content

Creating selection lists from MySQL data


sted999

Recommended Posts

Hiya all.

I was wondering if this was possible and I thought I'd ask you clever lot first if it is. I usually waste my time trying to build something that works but doesnt so I thought i'd check first!

 

What I am wanting to do is create a selection lists from the data in a MySQL table. For example if users have already entered towns into the database e.g. Newcastle, Sunderland, Durham, future users would be able to choose this from a selection list instead of typing it in.

 

Thanks for your help.

Stephen.

Can be done using simple pattern matching.

 

With AJAX as the user types a place name in it can match those first characters with the leading characters of places in a table - those that remain matching as the user types remain while others are removed thus leaving fewer and fewer left.

 

A simpler version would be to simply dump all the places into a drop-down selection box. You could zone these off by county eg. (devon) or even region (eg. southwest) and let the user find their own match.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.