I have a this .htaccess rule for my lease form
RewriteRule ^(lease)$ index.php?route=$1 [L]
which i am using with this PHP to file the proper file
$industries = array();
while($row_r = mysql_fetch_assoc($result)){
$industries[] = $row_r;
}
if(isset($_REQUEST['route'])){
$route = rtrim($_REQUEST['route'], '/');
$home_page = ($route == '') ? true : false;
$parts = explode('/', $route);
}else{
$home_page = true;
}
if(!$home_page){
include($_SERVER['DOCUMENT_ROOT'] . '/inc/routes.php');
}
routes.php file
$valid_pages = array('newsletter_subscribe', 'lease',....
$file = $parts[count($parts) - 1];
if (in_array($file, $valid_pages)) {
include($_SERVER['DOCUMENT_ROOT'] . "/pages/$file.php");
exit;
}else{
include($_SERVER['DOCUMENT_ROOT'] . "/pages/404.php");
exit;
this works great and i an getting to a pages/lease.php file. All is good but on the lease.php file i have a form that posts to itself like this
<?php if((isset($_POST['submitform'])) && ($_POST['submitform'])) {
echo "<pre>".print_r($_POST)."</pre>";
}
<form action="/pages/lease.php" method="post" id="app_form" name="app_form" onsubmit="return checkForm();">
<input type="text" name="print_config" value="email">
<p><input type="submit" name="submitform" value="Submit Application"></p>
....
BUT the POST is always empty...why is that and how do I preserve it..am I missing something