redirect not working
hi,
my data assist page is not redirecting:
code is:
<?php 
// WA Application Builder Insert
if (isset($_POST["OK"])) // Trigger
{
  $WA_connection = $cbank;
  $WA_table = "parts";
  $WA_sessionName = "parts_PartID";
  $WA_redirectURL = "parts_Results.php";
  if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
  $WA_keepQueryString = false;
  $WA_indexField = "PartID";
  $WA_fieldNamesStr = "PartName|SupplierID|PartSerialNumber";
  $WA_fieldValuesStr = "".((isset($_POST["PartName"]))?$_POST["PartName"]:"")  ."" . "|" . "".((isset($_POST["Supplier"]))?$_POST["Supplier"]:"")  ."" . "|" . "".((isset($_POST["PartSerialNumber"]))?$_POST["PartSerialNumber"]:"")  ."";
  $WA_columnTypesStr = "',none,''|none,none,NULL|',none,''";
  $WA_fieldNames = explode("|", $WA_fieldNamesStr);
  $WA_fieldValues = explode("|", $WA_fieldValuesStr);
  $WA_columns = explode("|", $WA_columnTypesStr);
  $WA_connectionDB = $database_cbank;
  mysql_select_db($WA_connectionDB, $WA_connection);
  if (!session_id()) session_start();
  $insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
  $WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
  $MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
  $_SESSION[$WA_sessionName] = mysql_insert_id();
  if ($WA_redirectURL != "")  {
    if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
      $WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
    }
    header("Location: ".$WA_redirectURL);
  }
}
?>
this happens on a blank white page or any page for that fact.
is there something wrong with the code it is producing?
the form action is set to POST.
many thanks


