Passing the URL to DB via function call