Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

AJAX POST or GET

Posted on 2016-07-30
2
42 Views
Last Modified: 2016-08-09
Should I be using POST or GET in my AJAX call?  User fills out a form, the email address is checked to see if it is already in the DB.  If not, the email is entered into the DB and then a confirmation email goes out to that person via plain text php mail();
0
Comment
Question by:rgranlund
2 Comments
 
LVL 24

Expert Comment

by:mankowitz
ID: 41736131
you can use either post or get for an ajax call. It doesn't really make a difference.

By the book, GET should be used for querying a database and POST should be used for updating a database, but again, it doesnt make a difference.
0
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41736913
>>Should I be using POST or GET in my AJAX call?
it depends on where the request posted to, technically you need to check the receiver point whether it accept POST/ GET requests.

since you're posting User details in your form, a POST request is preferred.

the validation of the email address need to be done at server end.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question