Page 1 of 1

Hmmmm... includes help

Posted: Wed Jan 29, 2003 2:58 pm
by romeo
I have a page that is included in a page that is included in a page...

from page 1 to page 2 variables are passed, but from page 2 to page 3 they are not...

i.e. index.php has an include menu.php, menu.php has an include online.php... so when i pass a varable to index.php via the address (i.e. index.php?a=1)

Menu can use the variable but online.php can not...

both are include(d)


Any help?, my online.php needs those variables :)?

Posted: Wed Jan 29, 2003 3:08 pm
by Johnm
I believe that if you make a hidden html input in index.php it should be available to all other included pages.

Code: Select all

<input type="hidden" name="a" value="<? echo $a ?>">
John M

nope

Posted: Wed Jan 29, 2003 3:19 pm
by romeo
Nope, tried it.. any other ideas and im listening


Thanks for trying tho

Posted: Wed Jan 29, 2003 3:54 pm
by bznutz
Could your configuration be screwed up?

Posted: Wed Jan 29, 2003 3:55 pm
by puckeye
Is there a way to include both files in index.php?

Posted: Wed Jan 29, 2003 4:04 pm
by bznutz
Did you include any of the first two files within another function or some other limited scope block of code?
Also, did you include <? ?> within both included files?

Posted: Thu Jan 30, 2003 5:13 am
by Johnm
Going off what puckeye said, try including both files in index.php but use require_once() to avoid other problems.

John M