Added php to perform SQL query