Everything i read tells me this should work
page 1 is
<?php
$state = $_GET['state'];
$brand = $_GET['brand'];
include ("my_path/state_brand_page_01.php");
?>
page 2 is
<?
//get all dealers for this brand and state
session_start();
include ('../../lib/db.php');
//=======================Start Local Insert
//This stops SQL Injection in POST vars
foreach ($_POST as $key => $value) {
$_POST[$key] = mysql_real_escape_string($value);
}
//This stops SQL Injection in GET vars
foreach ($_GET as $key => $value) {
$_GET[$key] = mysql_real_escape_string($value);
}
//get dealer
echo $state;
echo $_GET['state']; // NOTHING SHOWING
$dquery = mysql_query("SELECT * FROM dealer WHERE state='$_GET[state]' AND brand='$_GET[brand]' ORDER BY company DESC") or die(mysql_error());
?>
I am getting nothing here, no echo of the var, no return from the database. The page works fine on its own, just not when included
Thanks