help on include

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shotokan99

    #1

    help on include

    hi guys,

    is it possible to add query string on include? i tried but it didnt
    work. here's how i did it:

    <?php
    ..
    ..
    ..
    include 'mypage.php?id= jen';

    ..
    ?>

    help pls...

  • Jon Slaughter

    #2
    Re: help on include


    "shotokan99 " <soft_devjava@y ahoo.comwrote in message
    news:1177728785 .705140.109310@ n76g2000hsh.goo glegroups.com.. .
    hi guys,
    >
    is it possible to add query string on include? i tried but it didnt
    work. here's how i did it:
    >
    <?php
    .
    .
    .
    include 'mypage.php?id= jen';
    >
    .
    ?>
    >
    Why do you need to?

    just set $id = jen or however it works?

    i.e.

    $id = jen;
    include 'mypage.php'


    Comment

    • Hendri Kurniawan

      #3
      Re: help on include

      Jon Slaughter wrote:
      "shotokan99 " <soft_devjava@y ahoo.comwrote in message
      news:1177728785 .705140.109310@ n76g2000hsh.goo glegroups.com.. .
      >hi guys,
      >>
      >is it possible to add query string on include? i tried but it didnt
      >work. here's how i did it:
      >>
      ><?php
      >.
      >.
      >.
      >include 'mypage.php?id= jen';
      >>
      >.
      >?>
      >>
      >
      Why do you need to?
      >
      just set $id = jen or however it works?
      >
      i.e.
      >
      $id = jen;
      include 'mypage.php'
      >
      >
      Just building on Jon's comment.

      Do this:
      $_GET['id'] = 'jen';
      include('mypage .php');

      Setting $_GET will emulate: mypage.php?id=j en

      Hendri Kurniawan

      Comment

      • shotokan99

        #4
        Re: help on include

        tnx guys prob solved.

        is it possible to have an array get variable? something like this:

        $_GET['myarray'] = "item1, item2, item3";
        include('mypage .php');

        Comment

        • Jerry Stuckle

          #5
          Re: help on include

          shotokan99 wrote:
          tnx guys prob solved.
          >
          is it possible to have an array get variable? something like this:
          >
          $_GET['myarray'] = "item1, item2, item3";
          include('mypage .php');
          >
          $_GET['myarray] = array('item1', 'item2', 'item3);


          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          Working...