<?php

if ($_POST['formaction'] == 'add' || $_POST['formaction'] == 'edit')

{

	$ID					= $_POST['ID'];

	$ADDR_ID 			= $_POST['addrid'];

	$EMAIL				= trim($funcObj->AppendSlashes($_POST['txtemail']));

	$FIRSTNAME			= trim($funcObj->AppendSlashes($_POST['txtfname']));

	$LASTNAME			= trim($funcObj->AppendSlashes($_POST['txtlname']));

	$MISC_1				= trim($funcObj->AppendSlashes($_POST['txtcustom1']));

	$MISC_2				= trim($funcObj->AppendSlashes($_POST['txtcustom2']));

	$MISC_3 			= trim($funcObj->AppendSlashes($_POST['txtcustom3']));

	$IS_DELETED 		= trim($funcObj->AppendSlashes($_POST['chkunsubscribe']));

	

	$error = "";

	

	if (empty($EMAIL))

	{

		$error .= "Email address cannot be left blank.<br />";

	}

	else if (!validate_email ($EMAIL))

	{

		$error 	= "Invalid e-mail address.<br />";

	}

	

	if (strlen($error))

	{

		$errorMsg = "<strong>Please correct the following error(s):</strong> <br />

		$error";

	}

}

?>