Jump to content

Display content included in subsections


tfraser

Recommended Posts

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!

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.