I want to set both back and menu button in same page

On the same page, I have to show the back button and also with the menu button based on the condition.I have the page to get user id and contact no after that I have to validate and show user information by hiding the user input and show the user details. When I show the user details the menu button gets to hide and show the back button. In this scenario, I handle all the view on the same page