raplhie
raplhie

Reputation: 41

updating MySQL without page reload

basically im trying to make the ubiquitous "like button," and update a MySQL table after its clicked without loading the page. I imagine this would use javascript, but I'm not sure how to access MySQL with javascript. Please answer for pure javascript only as I dont use JQuery. Thanks.

Upvotes: 0

Views: 755

Answers (3)

user496650
user496650

Reputation:

To access a MySQL database from JavaScript, you'll need to implement a call to a server side script.

For tips on setting up the javascript without jQuery, you might check this guide (and the following pages): http://www.w3schools.com/ajax/ajax_xmlhttprequest_create.asp

Upvotes: 0

Nabeel
Nabeel

Reputation: 557

Ajax would be the perfect way. You access the "server page e.g. PHP/JSP/ASP" which in turn updates the MySQL table.

Upvotes: 0

Ovais Khatri
Ovais Khatri

Reputation: 3211

You have to use Ajax to accomplish this task.

Check this tutorial too.

Upvotes: 1

Related Questions