2 Different Types Of Golf Courses

Discussion in 'PHP' started by oo7ml, Feb 29, 2012.

  1. #1
    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
     
    oo7ml, Feb 29, 2012 IP
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    Just store the course id that it was played on. Depends on your exact script but it should be possible to have a URL like:

    www.website.com/course.php?course=a&id=12345

    And then if course = a, fetch from course a's table.
     
    blueparukia, Feb 29, 2012 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Cool, that is perfect, thanks...
     
    oo7ml, Feb 29, 2012 IP