johnnaples
johnnaples

Reputation: 407

How to insert data from html form into database without using HTML POST method?

Hi I would like to know if there is any other way using javascript or something to enter the user input directly to database without using POST method.

Upvotes: 0

Views: 1805

Answers (5)

Bob The Janitor
Bob The Janitor

Reputation: 20802

whats wrong with with using an Ajax call using jQuery, prototype, or dojo.

An other option is to use flash or silverlight and call a web service

Upvotes: 1

Allie the Icon
Allie the Icon

Reputation: 2140

If the result that you want is for the javascript itself to connect to the database and run the queries, then I believe the answer is no. However, this is something you would never ever want to do because it means the user would have full access to the database.

Upvotes: 3

Sam Axe
Sam Axe

Reputation: 33748

If the page is being viewed from a machine that has access to the database, then you can ask javascript to create an instance of the ADO activex objects (anone remember those? mebe I'm showing my age) and then your js code can talk direct to the database. Again, this only works for machines that can hit the db directly (local machine/network).

Upvotes: 0

RibaldEddie
RibaldEddie

Reputation: 5136

There are several HTTP commands:

GET POST PUT DELETE HEAD CONNECT TRACE

The only ones that will do what you want according to the specification are PUT and POST.

You shouldn't use GET to send data back to the server for storage. So if you don't want to use POST, use PUT.

Upvotes: 1

Hawk Kroeger
Hawk Kroeger

Reputation: 2334

Yes using the GET method. Over HTTP those are your choices.

Upvotes: 0

Related Questions