tfraser Posted July 21, 2011 Share Posted July 21, 2011 Hi everyone, I am currently building a uk job board in php. I want to allow people to browse jobs based on location. Currently I have all the locations stored in an xml file and inserted into a drop down box. The xml file looks like this; <dropdownmenu> <item>United Kingdom</item> <item>--- England</item> <item>--- --- East</item> <item>--- --- --- Cambridgeshire</item> <item>--- --- --- Norfolk</item> <item>--- --- --- Suffolk</item> <item>--- --- Greater London</item> <item>--- --- --- Central London</item> <item>--- --- --- East London</item> <item>--- --- --- North London</item> <item>--- --- --- South London</item> <item>--- --- --- West London</item> <item>--- --- Midlands</item> <item>--- --- --- Derbyshire</item> <item>--- --- --- Herefordshire</item> <item>--- --- --- Leicestershire</item> <item>--- --- --- Lincolnshire</item> <item>--- --- --- Northamptonshire</item> <item>--- --- --- Nottinghampshire</item> <item>--- --- --- Shropshire</item> <item>--- --- --- Staffordshire</item> <item>--- --- --- Warwickshire</item> <item>--- --- --- West Midlands</item> <item>--- --- --- Worcestershire</item> <item>--- --- North East</item> <item>--- --- --- Durham</item> <item>--- --- --- Northumberland</item> <item>--- --- --- Tyne and Wear</item> <item>--- --- --- Yorkshire and Humberside</item> <item>--- --- North West</item> <item>--- --- --- Cheshire</item> <item>--- --- --- Cumbria and Isle of Man</item> <item>--- --- --- Greater Manchester</item> <item>--- --- --- Lancashire</item> <item>--- --- --- Merseyside</item> <item>--- --- South East</item> <item>--- --- --- Bedfordshire</item> <item>--- --- --- Berkshire</item> <item>--- --- --- Buckinghamshire</item> <item>--- --- South West</item> <item>--- --- --- Avon</item> <item>--- --- --- Cornwall</item> <item>--- --- --- Devon</item> <item>--- --- --- Dorset</item> <item>--- --- --- Gloucestershire</item> <item>--- --- --- Somerset</item> <item>--- --- --- Wiltshire</item> <item>--- Northern Ireland</item> <item>--- Scotland</item> <item>--- --- Angus</item> <item>--- --- Argyllshire</item> <item>--- --- Ayrshire</item> <item>--- --- Borders</item> <item>--- --- Central Region</item> <item>--- --- Dumfries and Galloway</item> <item>--- --- Dumbartonshire</item> <item>--- --- East Scotland</item> <item>--- --- Edinburgh and Lothians</item> <item>--- --- Fife</item> <item>--- --- Glasgow</item> <item>--- --- Grampian</item> <item>--- --- Highland and Islands</item> <item>--- --- Inverclyde</item> <item>--- --- North Scotland</item> <item>--- --- Renfrewshire</item> <item>--- --- Tayside</item> <item>--- --- West Scotland</item> <item>--- Wales</item> <item>Republic of Ireland</item> </dropdownmenu> My problem is that I need all the sub-areas to display when one of the larger areas is selected, so for example if someone were to click 'England' it would search all jobs linked to the smaller areas. Would anyone be able to point me in the right direction as how to store this country data, and then how to search my mysql database to find all relevant jobs based on location and sub locations. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
tfraser Posted July 21, 2011 Author Share Posted July 21, 2011 Sorry posted this in the wrong section but I am unsure how to move the post to the correct section. Apologies! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.