By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

help on include

P: n/a
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...

Apr 28 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"shotokan99" <so**********@yahoo.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.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'
Apr 28 '07 #2

P: n/a
Jon Slaughter wrote:
"shotokan99" <so**********@yahoo.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.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=jen

Hendri Kurniawan
Apr 28 '07 #3

P: n/a
tnx guys prob solved.

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

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

Apr 30 '07 #4

P: n/a
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.
js*******@attglobal.net
==================
Apr 30 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.