I there a way to update data into mysql database when click on a link? I want create a comment voting system on my site so when user clicks on a “Vote for this comment” link, +1 should be sent into database…
How is that possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HTML
PHP – vote.php
jQuery
Note: This is an untested solution, but would be what I would consider a starting point to commence debugging and testing.
UPDATED: Changed behaviour to POST based on advice from @Artefacto.