You're welcome ;)
This part is not correct:
$name=array(); $email=array(); $role=array(); $rows = ; $rows = [ 'user_id' => $user_id, 'name' => $_POST['name'], 'email' => $_POST['email'], 'role' => $_POST['role'] ];
Your loop does:
while(1 < count($name))
It's like writing:
while(1 < count())
the print_r($stmt->debugDumpParams()); but it didn't display anything.
It will never run because $name, as array, is empty. Do:
$name = $_POST['name']; $email = $_POST['email']; $role = $_POST['role'];
each variable will be an array. I'm keeping this simple, here instead of $_POST you should use
filter_input_array(), but this can be refined when you get the script to work. You can, also, remove the $rows initialization and assignement, unless you don't need it for something else.