Foreach loop on trials page using PDO function in Users class