Question: PHP: Write the PHP code for a function reset ($db, $user, $account). The function should delete all the transactions for the given user and account.
PHP: Write the PHP code for a function reset ($db, $user, $account). The function should delete all the transactions for the given user and account. It should also update the balance in the user's accounts table and set it mostRecentTrans column to the current date and time using NOW( ) function. Answer: a. Assume the required inputs have already been acquired and sanitized. So don't repeat input here just the arguments to the function definition. b. Assume $user and $account have already been authenticated. So don't repeat that here. c. Execute an appropriate SQL delete statement to remove user's transactions using the correct mysqli_ function (procedural version) and the standard fallback call to mysqli_error. d. Execute an appropriate SQL update statement to set the user's given $account balance to 0.00 and mostRecentTrans column to NOW( ).(edited)
Answer needs to be in the above format
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
