SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My index page calls new pages with following url:

    index.php?page=links
    links is a simple link.php page...

    but when I try
    index.php?page=links&id=1
    to call category 1 in link.php, that doesn't work...
    the page doesn't receive that variable...
    what can i do?

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without the code of the script, we can't help you.
    And it should get the value of id.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  3. #3
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found it

    Code:
    <?
    if($page == links){ include("links.php?id=$id");}
    ?>
    the link:

    index.php?page=links&id=1

    easy, not?

  4. #4
    SitePoint Member
    Join Date
    Mar 2001
    Location
    Albany, NY
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you include just links.php it should work with the variable automatically since its passed to the current script. I'm not sure if doing that is going to mess anything up, but if I were coding it I'd just use:

    if($page == links){ include("links.php");}
    John Reyes
    HostRocket.com Support

  5. #5
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    declare

    GLOBAL
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services


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
  •