search.php - Now writing to DB if search is a URL or not