Delete file not working
I'm attempting to delete a file before I delete the associated record. The file is in a folder outside of the site root. The file is not being deleted.
<?php
$WA_DeleteFileResult1 = false;
if("" == ""){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("/home/cvoffers/_form", "".$row_rsForm['formFile'] ."");
}
?>
<?php
// WA Application Builder Delete
if ("" == "") // Trigger
{
$WA_connection = $connData;
$WA_table = "listingForm";
$WA_redirectURL = "cp.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "formID";
$WA_columnTypesStr = "none,none,NULL";
$WA_fieldValuesStr = "".$_GET['formID'] ."";
$WA_comparisonStr = "=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode($WA_AB_Split, $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_comparisions = explode("|", $WA_comparisonStr);
$WA_connectionDB = $database_connData;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$deleteParamsObj = WA_AB_generateWhereClause($WA_fieldNames, $WA_columns, $WA_fieldValues, $WA_comparisions);
$WA_Sql = "DELETE FROM `" . $WA_table . "` WHERE " . $deleteParamsObj->sqlWhereClause;
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
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);
}
}?>