Dear All,
Currently i am building a website with ifnormation on educational programmes in the Netherlands, effectively providing potential stutents with the details of all educational programmes of 31 universities.
I am undecided on what a good way to organize the structure would be. I was thinking about using one folder with in it the choice of up to 4 levels:
dutchdegrees.nl/degrees/ ( [University] | [programmecode] | [programme name] | [programme level] | [category])
So, either of these 4 could be used. HOwever, I am running into trouble for the logic of this. As I would not like to use something like /university/twente I will not be able to parse mu URL into a typical '$_GET[university]=>twente' structure. I will just get 'Twente'. The logic of further processing gets complex, so I would now like to get some inpu on how to organize my virtual folder structure, in a way that it makes sense, yet stays short. Running out of my vocabulary trying to find tyhe right terms though:
/degree/[degreename] | [degreecode]
/degrees/[university] XOR [programme level]
...
Anybody who is willing to give me some suggestions on how I could organize this?
In short:
University: Currently one of 31 number & letter-codes (Dutch institute code)
programmecode: One of ~3600 number & letter-codes
programme name: one of ~3600 strings
programme level: One of 4 strings (BSc, MSc, PhD, other)
Category: One of currently ~14 strings [pre-known set]
How to best organize my URL / virtual folders, and subsequent processing?
SOmething like this is what I have now, but I am not happy: Just put all after one another, and in the script try to deduct what is where:
if(is_array($subm))
{
foreach($subm as $label => $value)
{
if(is_numeric($value))
{
// category ID
if(array_key_exists($value, $catlist))
{
$searchfor['cat'] = 'cat';
$category = array('id' => $value, 'label' => $catlist[$value]);
}
}
else
{
if(in_array($value, $catlist))
{
// category label
$searchfor['cat'] = 'cat';
$catid = $catids[$value];
$category = array('label' =>$value, 'id' => $catid);
}
else
{
if(in_array($value, $catlist))
{
// programme type defined
$searchfor['type'] = 'type';
$degreetype = array('label' =>$value);
}
else
{
// Do search for programme name / Programme code
$programme = mysql_real_escape_string($value);
$searchfor = array('prog'=>'prog');
}
}
}
}
}