Results 1 to 2 of 2

Thread: PHP Help...

  1. #1
    Join Date
    Oct 2001

    PHP Help...

    Im working on a new site and I want to have a few tutorials.... But instead of having to link each chapter of the tutorial to a different URL I want to have a PHP script that will do it (in other words instead of linking to page2.html the script would be apache.php?page2) is this possible? I heard someone saying its Sectio0ns or something....
    Thanks in advance

  2. #2
    Hi mom!
    Join Date
    Aug 2001
    This works for me. In your example, your apache.php should have this content:
       header("location: page".$_GET["chapter"].".html");
    If you now go to this page: apache.php?chapter=3
    you will end up showing: page3.html

    There's a working example here: will bring you to page3.html

    I'm pretty new to php, so I'm not quite sure how this affect site security. Basically, you are giving users the opportunity to insert variables, so that can't be very good...

    Note that surfing to tries to forward you to page.html, since there isn't a variable 'chapter'. You could make your homepage/index here.
    I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.

Posting Permissions

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