First problem I see is that your get_answer() function:
function get_answer($input){
if ($input == ($att['ans']) )
{
echo "Correct Answer . {$att['ans_desc']}";
}
else {
echo "Wrong Answer . {$att['ans_desc']}";
}
}
attempts to use an undefined variable called $att.
EDIT: Second problem I see is that you're using some Javascript function called getAnswer() yet you haven't shown us the code for that Javascript function.