Solved

AJAX POST or GET

Posted on 2016-07-30
2
37 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 49

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
coldfusion, jQuery help 25 72
JQuery tracking event. 3 39
Wordpress type image upload 10 29
jQuery value within div undefined 3 21
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
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 how to dynamically set the form action using jQuery.
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now