Hi LaserLight and thank you for your reply.
This is what I have so far:
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE amember_bcoupon SET `comment`=%s, discount=%s, begin_date=%s, expire_date=%s WHERE code=%s",
GetSQLValueString($_POST['comment'], "text"),
GetSQLValueString($_POST['discount']['%'], "text"),
GetSQLValueString($_POST['begin_date'], "date"),
GetSQLValueString($_POST['expire_date'], "date"),
GetSQLValueString($_POST['code'], "text"));
mysql_select_db($database_bpin, $bpin);
$Result1 = mysql_query($updateSQL, $bpin) or die(mysql_error());
$updateGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
Its this part I am working on.
GetSQLValueString($_POST['discount']['%'], "text"),
Am I doing this right.