added update function in productWidget, and related functions in dbConnect