finished and updated all the database php files.