On 8/27/2012 7:21 PM, Ashley Sheridan wrote:
On Mon, 2012-08-27 at 18:54 -0400, Jack S wrote:

OK yes, <? works fine.
In respect to errors I get:
PHP Notice:  Undefined index: page
in /home/WebSite.com/www/includes/header.php on line 8

Line 8 has the below line of code
$calling_page = $_GET['page'];




On Mon, Aug 27, 2012 at 4:47 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:

         On Mon, 2012-08-27 at 16:37 -0400, Jack S wrote:

         > > How are you including this in your code? GET data won't be passed 
in a
         > > call like require("some_file.php?page=page");
         > > --
         > > Thanks,
         > > Ash
         > > http://www.ashleysheridan.co.uk
         > >
         > >
         >
         > Hi Ash,
         >
         > The index.php file has an include statement like so:
         > <?php include_once $_SERVER['DOCUMENT_ROOT'].'/includes/header.php'; 
?>
         >
         > The code snipet is at the top of the header file.
         > I have done this before and it worked, just can't seem to figure out
         > what is wrong here.
         >
         > Thanks!
         >
         >
         >
         >
         >




         Do you have errors and notices set to display, or have you
         checked the error logs for anything? It could be that some
         change in configuration is causing a problem with the include
         itself.


         --
         Thanks,
         Ash
         http://www.ashleysheridan.co.uk







--
Thanks!
Jack


Are you passing a page parameter through the URL? The error is basically
complaining that you're not.



So - is this INDEX.PHP script being called by a form on the client screen that has a field with the name of 'page'? And is the script (INDEX.PHP) being called via a GET method (and not a POST) in the <form> tag of the currently displayed page?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to