case'edit':
$id=$_POST['id'];
I repeatedly tested and found that where id='$id'; the $id inside is wrong , because the edit.php form does not submit $id, so you need to re-acquire and set a variable under action.php.
Finally got it done. I don't know if there is another way I got it wrong.
Is such that. That id is passed through a hidden field
<input name='id' value="{$user_info.id}">
Then you inject the object in the controller $request->param() can obtain all request objects.
like