database plus alerts

saves messages into the database and triggers alert messages if wrong
information is submitted