database and php integration