the 2 parameters in the function are fields in the database that i want to pass to that function
This part won't work in the way you hope. Unlike M$ Access, you're working in 2 environments: PHP and MySQL. You can't simultaneously select, manipulate, and update data in the 2 environments.
In all probability, however, you can use your UPDATE SQL code to manipulate the database data, and thereby achieve the same result.