Display response Mysql content HTML code php ajax Jquery

Description

Display Mysql database content in html code of response and returned by ajax, Jquery

I have used the PHP jquery AJAX and now display and fatch data and content

display the content in html and in html with name id class.Display the content used 

ajax Jquery php show content

 

Display same content like name email and other for both side use ajax, Jquery html

 

 

function which retrieves some content for mysql php HTML ajax Jquery

 

Syntext used 

 

" + data + "

 

$('#outputshow').html("<div>" + data + "</div>");

 

 

<script>  

 $(document).ready(function(){  

  $("#seahaddfollow").click(function() { 

       var htmcont;

  var txt = $("#country_name").val();

//alert(txt);

 

$.getJSON('followupaddeditshow.php',{'phonecode':txt}, function(data) {

//alert(data);

 htmcont = "";

            var name = data.name; 

var mbl = data.mbl;

 

htmcont += '<div class="form-group">';

htmcont += '<label class="control-label" for="inputSuccess1">Phone : &nbsp; </label>'; 

htmcont += '<label class="control-label" for="inputSuccess1" style="width:80%"> <input class="form-control boxed" id="inputaddpho1" name="" value="'+mbl+'" readonly style="background-color:#EBEBE4" type="text">  </label>';

htmcont += '</div>';

 

htmcont += '<div class="form-group">';

htmcont += '<label class="control-label" for="inputSuccess1">Name : &nbsp; </label>' 

htmcont += '<label class="control-label" for="inputSuccess1" style="width:80%"> <input class="form-control boxed" id="inputaddname1" name="" value="'+name+'" type="text">  </label>'

htmcont += '</div>'

htmcont += '<input type="hidden" class="form-control boxed" id="phonenocomment" name="phonenoclist" value="'+mbl+'" style="font-weight:normal" readonly>'

$("#followupaddeditshow").html(htmcont);

htmcontname = "";

               var name = data.name; 

htmcontname += '<div class="form-group">';

htmcontname += '<label class="control-label" for="inputSuccess1" style="width:95%"> '+name+' </label>'

htmcontname += '</div>'

$("#followshowname").html(htmcontname);

 

    });

 

});

 });  

 </script>

 

<div id='followupaddeditshow'>

                        <div class="form-group">

      <label class="control-label" for="inputSuccess1">Phone : &nbsp </label> 

<label class="control-label" for="inputSuccess1" style="width:80%">

<input type="text" class="form-control boxed" id="inputaddpho1" name="" value="<?php echo $_POST['phonecode']; ?>" readonly style="background-color:#EBEBE4">  </label>

</div>

<div class="form-group ">

<label class="control-label" for="inputSuccess1"> Name : &nbsp </label>

<label class="control-label" for="inputSuccess1" style="width:82%"> <input type="text" class="form-control boxed" id="inputaddname1" name="" value="<?php echo $rowlinkadd['name']; ?>"> </label>

</div>

 </div>

<div id='followshowname'></div>