debouncing on the code

thanks for the comment. the program works fine yet sometimes i get ghost inputs. how do i resolve this? sorry im just new in arduino :smiley: