Angular http POST pass Multiple Parameters PHP MySQLi

Rate this post

Angular http POST pass Multiple Parameters PHP MySQLi

Today, We want to share with you Angular http POST pass Multiple Parameters PHP MySQLi.
In this post we will show you Angularjs pass multiple parameters to $http post, hear for AngularJS Http Post Method ($ with Parameters Example we will give you demo and example for implement.
In this post, we will learn about AngularJS: $http POST example with Parameters with an example.

Angularjs Simple pass data parameters value to (client side to server side)$http post – Data in $ method used to request method are data passed in params value which are data posted to server side.

The $http method service is a core simple Angular service that functionality with communication with the remote data HTTP servers via all the browser’s data value XMLHttpRequest via object or via JSONP data value.

Basic Response Param

1. config – The pass a configuration(content type) object is used to generate(leep active) the request.
2. data – It is a return either string value or an object data.
3. headers – We able to get all the header information data.
4. status – We can get all the HTTP status(Like 200,201,400,etc..) code of the response data.
5. statusText – we can get the all HTTP status text of the response data.

READ :  Laravel Modal Confirmation before delete Record



var url_str=””;
$, {
params: { paramname1: value1, paramname2:value2, paramname3:value3…… }


Example : Simple pass parameter and value in Angularjs using $


$“”, {
params: { id: ‘9898’, name:’angularking’, email:’[email protected]’ }


Example 2 : send POST in angularjs with multiple params.


var data_valu = { id: ‘9898’, name:’angularking’, email:’[email protected]’}
url: “”,
method: “POST”,
params: data_valu


Example 3 :display username authentication in angularjs using Post Method


.success(function(msg) {
var uid=msg.SessionId;
var uname=msg.UserName;
.error(function(data, status) {


Example 4 : Full source code : $ server request in AngularJS


var infinityknowApp = angular.module(“infinityknowApp”, []);
infinityknowApp.controller(“infinityknowhttpCtrl”, function ($scope, $http) {

$scope.LoginData = function () {

READ :  Get Query String Parameters with Laravel 6

var dataval = $.param({
usersalesemailid: $scope.usersalesemailid,
userlpass: $scope.userlpass

var configheader = {
headers : { //pass headers
‘Content-Type’: // like authentication/json,etc.. ‘application/x-www-form-urlencoded;charset=utf-8;’

$‘’, dataval, configheader)
.success(function (dataresults, status, headers, config) {
$scope.PostDataResponse = dataresults;
.error(function (dataresults, status, header, config) {
$scope.alldatavalueresopnseresult = “Results: ” + dataresults +

Value of status: ” + status +

headers value : ” + header +

config value : ” + config;



Angularjs demo$http

Leave a Reply

Your email address will not be published.