Solved

AJAX POST or GET

Posted on 2016-07-30
2
45 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 52

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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Disable selected option from one select box when selected in another select box 26 84
Set css in function 11 54
Time Picker 3 22
carousel control extend past the images 9 25
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
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…

739 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