Results 1 to 7 of 7

Thread: php link problem

  1. #1
    Download 09 FTW TiMeZeRo's Avatar
    Join Date
    Aug 2005
    Location
    Cambridge, UK
    Posts
    831
    Thanks
    0
    Thanked
    1 time in 1 post

    php link problem

    right i cant with this out im not that advance with php but have a basic grasp
    im trying to get a link to change content in one section of a table i have created this making my whole chaning content across multipul pages easier.

    in the table field ittself i have the following coding

    <?php
    switch($page) { default: include('home.php');
    break; case "home": include('home.php');
    break; case "events": include('events.php');
    break; case "brews": include('brews.php');
    break; case "gallery": include('gallery.php');
    break; case "map": include('map.php');
    break; case "newsletter": include('newsletter.php');
    break; case "contact": include('contact.php');
    }
    ?>


    ive tried linking as ?page=gallery
    also index.php?page=gallery
    even going to the webaddress with ?page=gallery on the end of it
    but it never shows anything but home.php in the table field
    EVE - Online ( TiMeZeRo225, Proper Emo, Facter )
    World of Warcraft:
    Eu:The Shattar ( TiMeZeRo )
    Eu:Shattered halls (Pakapunch, Sigari, Eitu)
    CS:S - TiMeZeRo

  2. #2
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: php link problem

    Isn't this an extension of the whole magic_quotes runtime enabled palava?

    http://uk2.php.net/magic_quotes

    I think they finally killed what was an awful idea.

    PHP is a dead end language built on flawed ideas imho it should be left in the past where it belongs.
    <awates flames>
    throw new ArgumentException (String, String, Exception)

  3. #3
    Download 09 FTW TiMeZeRo's Avatar
    Join Date
    Aug 2005
    Location
    Cambridge, UK
    Posts
    831
    Thanks
    0
    Thanked
    1 time in 1 post

    Re: php link problem

    well unfortunately my employer woudl liek it coded in php so any ideas how to fix this
    EVE - Online ( TiMeZeRo225, Proper Emo, Facter )
    World of Warcraft:
    Eu:The Shattar ( TiMeZeRo )
    Eu:Shattered halls (Pakapunch, Sigari, Eitu)
    CS:S - TiMeZeRo

  4. #4
    Senior Member
    Join Date
    Jan 2009
    Location
    London
    Posts
    350
    Thanks
    6
    Thanked
    48 times in 42 posts
    • sadbuttrue's system
      • Motherboard:
      • Gigabyte P55 UD5
      • CPU:
      • i5 750 @ 3.8ghz + Megahalems + GT1450 @ 5v
      • Memory:
      • G.Skill ECO 4GB 1.4v
      • Storage:
      • Intel 320 120gb + Samsung F4 2tb in Scythe Quiet Drive
      • Graphics card(s):
      • 6950 @ 940/1350/1.175v + Shaman @ 20%
      • PSU:
      • Corsair AX750
      • Case:
      • Raven RV02 with 3xPhobya G-Silent Fans @ 210rpm + Scythe S-Flex 1200 @ 5v
      • Operating System:
      • Windows 7
      • Monitor(s):
      • Samsung 2233rz, Dell 2209wa, Panasonic AX200 Projector
      • Internet:
      • BeThere 24mb

    Re: php link problem

    use $_GET['page'] instead of $page

  5. #5
    Download 09 FTW TiMeZeRo's Avatar
    Join Date
    Aug 2005
    Location
    Cambridge, UK
    Posts
    831
    Thanks
    0
    Thanked
    1 time in 1 post

    Re: php link problem

    thanx a bunch worked a treat
    EVE - Online ( TiMeZeRo225, Proper Emo, Facter )
    World of Warcraft:
    Eu:The Shattar ( TiMeZeRo )
    Eu:Shattered halls (Pakapunch, Sigari, Eitu)
    CS:S - TiMeZeRo

  6. #6
    Registered+
    Join Date
    Sep 2009
    Posts
    24
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: php link problem

    You might like to look at $_REQUEST[] and $_POST[] as alternatives to $_GET[] too.

    :¬}

  7. #7
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Re: php link problem

    $_REQUEST is just a combination of cookies, querystring and post data in a certain order of precedence. Using get, cookie, or post explicity is much better practice.
    To err is human. To really foul things up ... you need a computer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. XFX 6800GT Problem
    By nvisage in forum SCAN.care@HEXUS
    Replies: 45
    Last Post: 07-08-2006, 12:28 AM
  2. SN25P PSU or PCI-E problem!?
    By SilverFern in forum PC Hardware and Components
    Replies: 1
    Last Post: 19-01-2006, 10:51 AM
  3. Replies: 23
    Last Post: 08-08-2005, 11:05 AM
  4. Replies: 13
    Last Post: 30-07-2005, 06:15 PM
  5. Anyone noticed that "HEXUS.affiliate SYtem" link thingy?
    By Nick in forum General Discussion
    Replies: 6
    Last Post: 06-07-2005, 04:32 PM

Posting Permissions

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