1

I want to use backbone.js .

http://documentcloud.github.com/backbone/examples/todos/index.html

In this example it store in the local storage.but i want to store in the database so for this what changes i need to do in the code.

Please suggest .

XMen
  • 29,384
  • 41
  • 99
  • 151

1 Answers1

2

If I understand your question correctly it's something I was wondering about, I recently posted a question about RESTful persistence in PHP.

Since Javascript doesn't have access to the filesystem you can't use it to write to a database. You'll have to pick a backend server in another language like PHP, Rails, Ruby, whatever. There are a few suggestions for PHP at the link above.

Community
  • 1
  • 1
  • Hi pat , i want to call php script from javascript or jquery to update the db , – XMen May 10 '11 at 11:35
  • Hi Rahul, basically you're going to have to either write some PHP that looks at `$_SERVER['method']` and run a switch like the one suggested in the first reply on my question, or you'll have to pick a framework like those suggested in the second reply. –  May 10 '11 at 22:48