adding php to check databse