The code is not working properly

the code is showing only 1st row