Search found 3 matches

by @modi
Thu Mar 22, 2007 8:37 am
Forum: PHP - Code
Topic: website template / using $_POST and $_GET from included file
Replies: 1
Views: 361

I just realized $_GET and $_POST are global variables, so I can always access them from an included file. I do still have the problem of having a form with method="GET", because it prevents having a central template file that takes page requests via GET and returns the corresponding page, ...
by @modi
Mon Mar 19, 2007 12:30 am
Forum: PHP - Code
Topic: getting the name of the requested page from an included page
Replies: 2
Views: 483

getting the name of the requested page from an included page

If you have one page that includes another, is there a way for the included file to access the name of the first page when it is requested? For example: index.php: <?php include_once("navigation.php");?> ... navigation.php: You requested page: <?php echo $requested_page?>. Is there a way t...
by @modi
Mon Mar 19, 2007 12:19 am
Forum: PHP - Code
Topic: website template / using $_POST and $_GET from included file
Replies: 1
Views: 361

website template / using $_POST and $_GET from included file

I wanted to apply a certain structure/template to every page in my website. The way it is set up now is with an index.php file taking GET requests and returning the corresponding page: index.php: ... $return_page = ""; switch( $_GET["page"] ) { case "home": $return_page...