On Tue, 3 Jun 2003 19:16:30 +0200, +ystein H†land wrote: >Now my code is > >extract ($_GET); >if ($_GET['printout'] != "yeah") { include("header.php"); } > >but I still get the following error: > >Undefined index: printout > >I understand nothing
Ok, it looks like you are mixing your metaphors.... ;) If you use extract( $_GET ); -- you should have a $printout variable available (assuming you aren't doing a POST form and you are on a version of PHP that supports $_GET). At least two of the following should work... --- Option 1 --- GET method - New PHP extract($_GET); if ($printout != "yeah") { include("header.php"); } --- Option 2 --- POST method - New PHP extract($_POST); if ($printout != "yeah") { include("header.php"); } --- Option 3 --- GET method - Older PHP extract($HTTP_GET_VARS); if ($printout != "yeah") { include("header.php"); } --- Option 4 --- POST method - Older PHP extract($HTTP_POST_VARS); if ($printout != "yeah") { include("header.php"); } --- Option 5 --- GET method - new php - No extract if ( $_GET[ 'printout' ] != "yeah") { include("header.php"); } --- Option 6 --- POST method - new php - No extract if ( $_POST[ 'printout' ] != "yeah") { include("header.php"); } --- Option 7 --- GET method - older php - No extract if ( $HTTP_GET_VARS[ 'printout' ] != "yeah") { include("header.php"); } --- Option 8 --- POST method - older php - No extract if ( $HTTP_POST_VARS[ 'printout' ] != "yeah") { include("header.php"); } ---- End --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php