PHP writes to SQL DB

PHP now writes search results info to SQL DB.