Results 1 to 5 of 5

Thread: What kind of PHP page is this

  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What kind of PHP page is this

    I am new to php and I want to make dynamic php page that would look like this:

    http://www.sdfsdfsdfsdfsdf.com/index.php?id=1

    What means index.php?id=1 ????
    Is this link that loads data from database or from PHP pages.
    How can I make links that look like this index.php?id=1

    Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In your example, the 1 is $_GET['id']. However, I prefer the http://www.example.com/page.php/1 form, where the 1 is obtained by preg_replace('\\D', '', $_SERVER['PATH_INFO']) + 0.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the info but can you give me very sample example. Like we all know the easiest way for learning is from examples.
    So does this kind of link loads the data from database or it takes php page.
    I am learning now php but don't understand this cind of browsing. Thanks.

    What does this link loads index.php?id=1 ???

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    So does this kind of link loads the data from database or it takes php page.
    It's impossible to tell. Some data is passed to the PHP page in the URL (in this case, an ID of some sort presumably), but what the page then does with that data is a mystery.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Aha yes ok I understand it thanks. I see what is the point.
    Thanks again.

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
  •