Hi JOYSON,
The link which you shared is already having working sample which stores the data in database using jQuery Ajax Call.
Please cross check the link which you have provided is correct one or different one.
If the shared link is correct then what you want to achieve in it as already working sample is provided to you.