views:

27

answers:

3

I'm very new at using JS and AJAX. Currently I'm working with Google Maps API and I need to store some locations (lat,long) to the server.

What I want to do is store some sort of data in my existing MySQL database in server. I have got some good example as well like the following-

http://www.tutorialspoint.com/ajax/ajax_database.htm

Now my question is, will the server side php code be necessary if I only need to store data in the database (As it's written that this file is to fetch data from the server)?

Any kind of help will be appreciated.

+1  A: 

It would be very bad if a remote request could arbitrarily store or retrieve data from a database. Yes, you will need some server side code to either store or retrieve data.

Unless you're trying to write a tool to manage a database remotely, in which case disregard what I just said. But still, you'll need server side scripting of some sort in order to access the database.

mootinator
+1  A: 

Ajax is a client side framework based on javascript language.

It is useful to help developing richer application for what concerns the client side aspect but you always need a server side language to interact with your data store.

Lorenzo
AJAX isn't as much of a framework as it is a buzzword created to describe a method of updating the browser's view state using an asynchronous javascript request. jQuery is a popular client side AJAX framework.
mootinator
A: 

Yes you need server processing. You should see AJAX as a way to transport information to the server without loading the page. However the server still needs some code to receive this, make sense of it and store it in the database.

Slappy