added database code to  interact  with PHP