Hello friends,

I am stuck on a script and I would like your help and advice,

I have a script in writing, but I have nothing written yet. So I don’t have a script!.

What I need:

I have a page called say example.php and what I want to happen is when example.php?=0001 is typed in it includes the file htmlfiles/0001.html inside the example.php

I know how to include files I’m not sure how to link them using “?=”

I know this can be done but I’m not sure where to being.

Thank you.

    You need a variable set in the query string i.e.:

    ?id=0001

    then:

    $include = "htmlfiles/" . $_GET['id'];

    include ($include);

      Thanks, i figured it out using $_GET['id'];

      then used

      $include = "htmlfiles/" . $_GET['id'].".html";

      to include the file.

        Good, be sure to mark the thread as [RESOLVED].

          Write a Reply...