Usage of for loop in Jquery syntax with example

Here am going to explain the use of for loop in JQuery with an example

Add a page ajax_angular_view.php with response format

{"Company1":"IBM","Company2":"TCL","Company3":"GOOGLE"}

HTML Area

 <div><input id="update_company_name_comapny1" type="text" value="" /></div>
<div><input id="update_company_name_comapny2" type="text" value="" /></div>
<div><input id="update_company_name_comapny3" type="text" value="" /></div>
var company_id=1
$.ajax({
                url: "ajax_angular_view.php?action=view_company_info_by_id&company_id="+company_id,
                type: "post",
                success: function(data) {
					
                    var obj = JSON.parse(data);
		for(var k in obj) {
					$("#update_company_name_"+k).val(obj[k])
 
                     }
		console.log(obj);
                     
                }
            });

How to add Auto suggestion in Jquery by customer name for customer id

T o add Auto suggestion in jquery for customer name and customer id

 $('#customer_name').autocomplete({
    source : function (request, response) {
        $.getJSON("ajax_angular_view.php?action=view_customers", {
            term: request.term
        }, function(data) {                     
            var array = data.error ? [] : $.map(data.Clist, function(m) {
                return {
					
                    label: m.name,
                    value: m.value
                };
            });
            response(array);
        });
    },   select: function (event, ui) {
		  event.preventDefault();
        $("#customer_name").val(ui.item.label); // display the selected text
        $("#user_id").val(ui.item.value); // save selected id to hidden input
        return false;
          }
,    focus: function(event, ui) {
        event.preventDefault();
        $("#customer_name").val(ui.item.label);
    }
});

ajax_angular_view.php?action=view_customers Result should be

{“Clist”:[{“name”:”Hareram Sharma”,”value”:”1″},{“name”:”Jitender”,”value”:”2″},{“name”:”soni”,”value”:”3″}]}

How to install LAMP in AWS server

Amazon Web Services is a one of the most flexible hosting service providers,but most of them are facing difficult how to install  LAMP (Apache , MySQL and PHP ) in AWS with out using paid Cpanel service . Here am going to ellobrate by steps how to install LAMP in AWS server

1 Install Apache

# sudo yum install httpd

# sudo systemctl start httpd.service

#sudo systemctl enable httpd.service

Try https://IP ADDRESS in browsers

 2  Install Database

#sudo yum install mariadb-server mariadb

# sudo yum install mariadb-server mariadb

# sudo mysql_secure_installation

#sudo systemctl enable mariadb.service

3) Install phpMyAdmin

# sudo yum Install phpMyAdmin

Try  http://yourIPaddress/phpmyadmin