2 Different Types Of Golf Courses

Hi, i am developing a website for a golf course. The Golf Course actually has 2 different playing courses, The Beach Course and the Woodland Course.

The site allows the users to enter in their score and complete a small questionnaire each time they play SO they must choose a course each time before they start entering their information…

NOTE: i have created 2 separate tables for each course as they have a lot of different attributes… also one user can enter several scores for both courses over a period of time.

My Question Is:

The user can email each of their score profiles to other members and friends and their scores can also be accessible from their profile, so how should i control the IDs for each course considering their is 2 different tables… should i just display it as www.website.com/courseA.php?id=12345 and www.website.com/courseB.php?id=13225 OR is there a way in which i can display them without having to use A and B - thanks in advance

Hi oo7ml,

You could use www.website.com?course=a&id=13224

Then using re-writing you could enforce friendly looking domains - if using your apache you can do this using rewrite rules in you .htcaccess file - like:

www.website.com/a/13224

Then in your site index.php you could:


$course = null;
$course = htmlentities($_GET['course']);
$id = null;
$id = htmlentities($_GET['id']);
switch ($site){
  case a:
    // do course a stuff or redirect to site a
    break;
  case b:
     // do course b stuff or redirect to site b
    break;
}

Cool, thanks for your help… i think i might also apply another ID for the course type first before i make it friendly