Save visit information to database