Need to place html code on dynamic pages- PHP help

Discussion in 'Programming' started by ientrepreneur, Nov 9, 2007.

  1. #1
    I need to place three set HTML advertisement codes in

    mydomain/index.php,
    mydomain/index.php?tag=funny+videos,
    mydomain/index.php?tag=music+videos


    But I have only the index.php file. Where to place the code for mydomain/index.php?tag=funny+videos and mydomain/index.php?tag=music+videos

    Please help me!!
     
    ientrepreneur, Nov 9, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    all are going to the same file and so the index.php will need to include conditional logic (ie if tag=funny+videos then .... else if tag=music+videos then .... else .....)

    This can be directly in the file or can be in a separate file pulled in with an include if your using PHP, ASP etc or a shared class if in .Net
     
    AstarothSolutions, Nov 9, 2007 IP
  3. ientrepreneur

    ientrepreneur Banned

    Messages:
    1,199
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #3
    But "tag" is not a declared variable. then how can I declare conditional logic (ie if tag=funny+videos then .... else if tag=music+videos then .... else .....)
     
    ientrepreneur, Nov 9, 2007 IP
  4. ientrepreneur

    ientrepreneur Banned

    Messages:
    1,199
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Astarothsolutions . I got it!!
     
    ientrepreneur, Nov 9, 2007 IP
  5. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    NP - couldnt give a code example as we use .Net rather than PHP
     
    AstarothSolutions, Nov 9, 2007 IP