add database connection and jquery.validate.js