Project 2 help, think innovative

In project 2, survey site, how can i get the responses when the submit button is clicked by user?
Thanks in advance for your suggestions!

whit javascript like this. Or whit php like this. More on JavaScript Form Validation