Hi Everyone,
I'm currently working on a project, but I can't solve a problem I'm facing.
What I would like to create is this:
I've got records that are based on a county and a category.
I want to start with both a list of categories, as well as a list of counties as an entrypoint.
The problem isn't in creating the lists or something, but it's the structure I want to do it in. I would like to use virtual subfolders.
Like when you start with selecting a category, you get on the page:
/categoryname/county_overview.php
and when you've selected the county, then you'll get into:
/categoryname/countyname/showlist.php
Also this isn't a problem. The problem starts when I want to start from the county list as well, as you would get this:
/countyname/category_overview.php
/countyname/categoryname/showlist.php
I don't know how I would be able to see which entrypoint the user has chosen, was it a category or a county(e.g. is the first subfolder name the name of a category or is it one of a county).
If you've got an idea about a solution, please post it, you would really help me a lot.
Greetz Jolly.
question
Moderator: General Moderators
Depends on your exact setup, but presuming you can get/know the entry point, lets say $entrypoint, and the countries are in an array, then you could use in_array to see if $entrypoint is there, if not you can presume it's a category ?
-
jollyjumper
- Forum Contributor
- Posts: 107
- Joined: Sat Jan 25, 2003 11:03 am
Hi Mark,
Thank you for your reply.
The categories and counties will be in a database.
I've thought about the sollution you spoke about before I posted my question, but the major downside about this is that I would have to select either all counties or categories to check this, even if I don't need all the other categories or counties.
I don't think it's a bad sollution, maybe it's the only one, but I'm hoping for a better one.
Greetz Jolly.
Thank you for your reply.
The categories and counties will be in a database.
I've thought about the sollution you spoke about before I posted my question, but the major downside about this is that I would have to select either all counties or categories to check this, even if I don't need all the other categories or counties.
I don't think it's a bad sollution, maybe it's the only one, but I'm hoping for a better one.
Greetz Jolly.
-
jollyjumper
- Forum Contributor
- Posts: 107
- Joined: Sat Jan 25, 2003 11:03 am