Robert Hurst
Robert Hurst

Reputation: 9092

I'm building a javascript app, I need a lightweight php script to interact with a database and javascript using json

My app is a very complex game that uses json objects to store its execution state (aka save games). I'm looking for a nice database script that can talk json and interact with javascript via ajax.

Upvotes: 0

Views: 68

Answers (2)

Cesar
Cesar

Reputation: 4437

you mean something like http://www.persvr.org/ ?

Upvotes: 1

iangraham
iangraham

Reputation: 438

I'm not sure how familiar you are with php, but you can send JSON objects to a php with ajax and then use json_decode() to turn the JSON object into an associative array, then when you want to pass a JSON object back, you have your use json_encode() on your associative array and it will turn it into a JSON object that gets returned to javascript. As far as having a database script ready made, you'll have to be more specific with what you're looking for.

Upvotes: 0

Related Questions