Implemented db operations on php

Signed-off-by: Purvi Desai <pdesai@eng.ucsd.edu>