SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Switch with get

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Posts
    99
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Switch with get

    Hey there,

    i am working on a project with said project i am using dynamic urls so say i have index and then for the store page it would be ?page=store however i would like to get rid of the ?page and just have it ?store or ?contact i know how to do this with if's but i would rather use a switch is it possible able to do it with out the ?page variable ?

    Thanks!

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Without using a proper URL argument and value your code will end up been way too complicated, the easiest and most assured way to go about this is to just continue using ?store=xxx.

  3. #3
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,234
    Mentioned
    154 Post(s)
    Tagged
    0 Thread(s)
    And if you still want to simplify your URL, you can always use Mod_Rewrite rules (there is a separate forum here for help on that subject).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •