modify code get lastid and forward to view page after add new item