In this case you need to include the php folder or directory path to the all the global paths available in command line interface.
right click on the My Computer icon of the windows and you will be able to see the screen as given below
Click on the Advanced Tab of this window and then click on the Environment Variables button of the window
In the new window select TMP variable and then select Path variable and click on edit button.
At the end of the variable value field add the path of the directory (containing the php.exe sometimes its not what is given here. i.e. i had one situation where it was E:\wamp\bin\php\php5.2.8) for php (here it is ;C:\wamp\php) also put a semcolon (;) to seperate the path with the other existing paths.
Now one by one click ok for each window opened and restart your computer and the task is complete.
To check it just type php -v and press Enter.