form processing & dbconnection