for the undefined index errors, change line 154:
$WA_comparisonStr = " LIKE | LIKE | = | LIKE | LIKE | = | = | = | LIKE | LIKE";
$WA_comparisonStr = " LIKE | LIKE | = | LIKE | LIKE | = | = | = | LIKE | LIKE | LIKE";
the last error though:
Cannot add or update a child row: a foreign key constraint fails (`ecloyalty_ecloyalty_biz`.`tblproject`, CONSTRAINT `fk_uname2` FOREIGN KEY (`uname`) REFERENCES `tbluser` (`uname`) ON UPDATE CASCADE)
is being caused by a foriegn key constraint that is set in your database that is failing.