Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

AJAX POST or GET

Posted on 2016-07-30
2
Medium Priority
?
59 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
[X]
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
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 53

Accepted Solution

by:
Ryan Chong earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

636 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