I'm just using the $editformaction that Dreamweaver spits out.
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "UpdateRecord")) {
$updateSQL = sprintf("UPDATE SGD_FT SET FileName=%s WHERE FileID=%s",
GetSQLValueString($_POST['FileName'], "text"),
GetSQLValueString($_POST['FileID'], "int"));
mysql_select_db($database_SGD_Database, $SGD_Database);
$Result1 = mysql_query($updateSQL, $SGD_Database) or die(mysql_error());
$updateGoTo = "r3S.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_FileUpdate = "-1";
if (isset($_GET['FileID'])) {
$colname_FileUpdate = (get_magic_quotes_gpc()) ? $_GET['FileID'] : addslashes($_GET['FileID']);
}
mysql_select_db($database_SGD_Database, $SGD_Database);
$query_FileUpdate = sprintf("SELECT * FROM SGD_FT WHERE FileID = %s", $colname_FileUpdate);
$FileUpdate = mysql_query($query_FileUpdate, $SGD_Database) or die(mysql_error());
$row_FileUpdate = mysql_fetch_assoc($FileUpdate);
$totalRows_FileUpdate = mysql_num_rows($FileUpdate);
?>
So, somewhere in there? If so, where?