Hello there.
I use rather complex scripts and name them, for example,
page_root.php
This page acts as a "control center" and decides which forms or pages to include based on the last page submitted and some other factor. All of the include files have the format:
page_root_1.php
page_root_2.php
page_root_3.php
..
..
ALSO, I have information on these pages stored in a database and there are some conventions on the index numbers 1,2,3, etc..
Each form identifies itself with a hidden field:
<input type=hidden name=component value=1> (or 2, 3, etc.)
My problem and question is: I may need to re-index these forms from time to time in the database and also changing the name of the file number at the end to match. Now, I know $PHP_SELF is the INCLUDING PAGE name, but is there any environment variable that is the INCLUDED page name, so I could do:
<input type=hidden name=component value=<?php echo $PHP_INCLUDE;?> >
I know I could do it manually but it's one thing less to have to worry about, and sometimes the include process gets complicated.
Thanks, this will be interesting to know.
Sincerely,
Sam Fullman
Compass Point Media