<?php
$error =''; 
if (isset($_POST['formaction']) && $_POST['formaction'] == 'add')
{
	$error .= "Adding new parameter has been disabled.<br />";
}

if (strlen($error))
{
		$errorMsg = "<strong style='color: red'>$error</strong>";
}

if (isset($_POST['formaction']) && $_POST['formaction'] == 'edit')
{
	$ID 		= isset($_POST['ID']) ? $_POST['ID'] :'';
	$FIELDCONSTANT 		= isset($_POST['txtfieldconstant']) ? $_POST['txtfieldconstant'] :'';
	$FIELDVALUE			= trim($funcObj->AppendSlashes($_POST['txtfieldvalue']));
	$DESCRIPTION 		= trim($funcObj->AppendSlashes($_POST['txtdescription']));
	
	$error = "";
	
	if (empty($FIELDVALUE))
	{
		$error .= "Parameter value is required.<br />";
	}
	
	if (strlen($error))
	{
		$errorMsg = "<strong>Please correct the following error(s):</strong> <br />
		$error";
	}
}
?>