1

I searched all over net for an hour i couldn't find a decent code for updating database using javascript. Can anyone just give me a reference please??

1
  • 1
    You are looking for AJAX Commented May 18, 2012 at 14:09

3 Answers 3

2

You can do that with Node.js

Here's a sample blog post from interwebz that shows how to do it:

http://www.giantflyingsaucer.com/blog/?p=2596

Sign up to request clarification or add additional context in comments.

1 Comment

Nice, gives me one more reason not to ignore node.js
1

You need some kind of ServerSide Scripting (php, perl, cgi, java, etc.) Take a look on this: JavaScript to update MySQL?

Comments

1

JavaScript on itself cannot query any DB for you, as it can work effectively only on the browser. To work with DB you can use use PHP , and use ajax to communicate using $.ajax or $.post methods. A simple search on this will get you references. In short you can use ajax to communicate with PHP script which will in turn query the DB for you.

To start you can take a look at this, http://webcheatsheet.com/php/connect_mysql_database.php

Main thing to remember is Javascript will only affect your browser. I hope this helps.

Regards

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.