You need to send back to the server all the info needed to ensure there are no duplicates.
- The
userID
- The
surveyID
- The
questionID
- The
answerID
When you get the values on the server items 1, 2, & 3 must be a unique combination... otherwise the user is trying to submit multiple answers (intentional or otherwise).
Note: That if your questions are not tied to a survey consider #2 above as optional when determining uniqueness.
In addition... once you've registered the user's answer to a given question you could have your AJAX return a flag that tells you that your JavaScript code should disable that question or display it in a "done" state so that the user doesn't try to re-answer it.