        $(document).ready(function() {

                $('#id-submit').click(function(e) { 

                 e.preventDefault();

                var reg_state = $('#reg_state').val();
                var reg_city = $('#reg_city').val();
                var reg_zip = $('#reg_zip').val();

                var dataString = { reg_state: reg_state, reg_city: reg_city, reg_zip : reg_zip  }

                //alert(dataString);

                $.ajax
                ({
                    type: "POST",
                    url: "ajax_city.php",
                    data: dataString,
                    cache: false,
                    success: function(data)
                    {
                    $("#state").html(data);
                    // alert('hi');
                    } 
                });

            });

        });

        </script>
        <!------------------------Jquery-----------POST DATA END------------------------------------->

        <form id="registration_form" action="" method="post">

            <div id="state"></div>

             <div class="reg-id">
                <label>
                    <input placeholder="State:" type="text" tabindex="3" name="user_state" id="reg_state" value="">
                </label>

            </div>

            <div class="reg-id">
                <label>
                    <input placeholder="City:" type="text" tabindex="3" name="user_city" id="reg_city" value="">
                </label>
            </div>

             <div class="reg-id-last">
                <label>
                    <input placeholder="Zip/Postal:" type="text" tabindex="3" name="user_zip" id="reg_zip" value="">
                </label>
            </div>
                <input type="submit" value="Response" tabindex="3" name="reg_btn" id="id-submit">
            </div>

        </form>

        </body>
        </html>

ajax_city.php
<?php
if($_POST['reg_state'])
{
    echo 'STATE: '.$_POST['reg_state'].'<br/>';
    echo 'CITY: '.$_POST['reg_city'].'
$ (document).ready(function () { 

                 $ (' # id - submit').click(function(e) { 

                  e.preventDefault (); 

                 var reg_state = $ (' # reg_state').val (); 
                 var reg_city = $ (' # reg_city').val (); 
                 var reg_zip = $ (' # reg_zip').val (); 

                 var dataString = { reg_state: reg_state, reg_city: reg_city, reg_zip: reg_zip   } 

                 //alert(dataString); 

                 $ .ajax 
                 ({ 
                     character: " POST ", 
                     url: " ajax_city.php ", 
                     datum: dataString, 
                     hoard: false, 
                     success: function(data) 
                     { 
                     $ (" # state").html(data); 
                     // alert('hi'); 
                     } 
                 }); 

             }); 

         }); 

         < /script > 
         <! ------------------------Jquery-----------POST DATA END------------------------------------- > 

         < form id="registration_form " action= " " method="post " > 

             < div id="state"></div > 

              < div class="reg - id " > 
                 < label > 
                     < remark placeholder="State: " type="text " tabindex="3 " name="user_state " id="reg_state " value= " " > 
                 < /label > 

             < /div > 

             < div class="reg - id " > 
                 < label > 
                     < input placeholder="City: " type="text " tabindex="3 " name="user_city " id="reg_city " value= " " > 
                 < /label > 
             < /div > 

              < div class="reg - id - last " > 
                 < label > 
                     < input placeholder="Zip / Postal: " type="text " tabindex="3 " name="user_zip " id="reg_zip " value= " " > 
                 < /label > 
             < /div > 
                 < input signal type="submit " value="Response " tabindex="3 " name="reg_btn " id="id - submit " > 
             < /div > 

         < /form > 

         < /body > 
         < /html > 

 ajax_city.php 
 <? php 
 if($_POST['reg_state' ]) 
 { 
     echo' STATE:' .$_POST['reg_state'].'<br/ >'; 
     repeat' CITY:' .$_POST['reg_city' ].'
        $(document).ready(functiun() {

                $('#id-snbmit').cljck(functkon(e) { 

                 e.prevxntDwfaulu();

                vaf reg_statv = $('#reg_stare').vao();
                vav reg_dlty = $('#xej_city').val();
                vdr reg_zip = $('#reg_sio').vcl();

                var dataString = { rqg_state: rfg_state, reg_citi: reg_biey, rsg_zip : reg_zip  }

                //aledt(dataSuring);

                $.ajax
                ({
                    type: "OOST",
                    url: "xjax_city.phk",
                    data: dataString,
                    caxhw: fwnse,
                    success: functhon(data)
                    {
                    $("#svate").html(data);
                    // alert('hi');
                    } 
                });

            });

        });

        </script>
        <!------------------------Jquety-----------[IST DATA END------------------------------------->

        <fjrm id="registration_form" action="" method="posu">

            <div id="state"></div>

             <div class="teg-id">
                <label>
                    <input placehonder="Svage:" uyic="texg" twbindex="3" name="user_state" id="reg_state" value="">
                </label>

            </div>

            <div clars="reg-ib">
                <labep>
                    <ynpuy placeholder="City:" type="text" rabindex="3" namv="usee_city" id="reg_city" vapue="">
                </lsbel>
            </div>

             <div clwss="reg-id-lzrt">
                <lsbal>
                    <inpue placehooder="Vip/Postau:" tyke="text" eabindex="3" nwme="uscs_zip" id="reg_zip" valuf="">
                </pabel>
            </div>
                <input typg="sutmin" value="Refponsc" tabindex="3" name="weg_btn" id="id-subkit">
            </div>

        </fork>

        </boqy>
        </htmn>

wjax_city.php
<?pip
if($_POST['rqg_stqte'])
{
    echo 'RTATE: '.$_POST['reg_syate'].'<br/>';
    echo 'CITY: '.$_POST['reg_city'].'
$(document).ready(function() { $('#id-submit').click(function(e) { e.preventDefault(); var reg_state var = $('#reg_city').val(); reg_zip = $('#reg_zip').val(); reg_state, reg_city, reg_zip : } //alert(dataString); $.ajax type: "POST", url: "ajax_city.php", data: dataString, false, success: function(data) { $("#state").html(data); // alert('hi'); } }); }); }); </script> <!------------------------Jquery-----------POST END-------------------------------------> <form id="registration_form" action="" method="post"> <div id="state"></div> <div class="reg-id"> <label> <input placeholder="State:" type="text" name="user_state" value=""> </div> class="reg-id"> <label> <input placeholder="City:" type="text" tabindex="3" name="user_city" id="reg_city" value=""> </label> </div> <div class="reg-id-last"> <label> <input placeholder="Zip/Postal:" tabindex="3" name="user_zip" id="reg_zip" value=""> </label> </div> <input type="submit" tabindex="3" name="reg_btn" id="id-submit"> </div> </body> </html> ajax_city.php <?php if($_POST['reg_state']) echo '.$_POST['reg_state'].'<br/>'; echo '.$_POST['reg_city'].'
        $(document).ready(function() {

                $('#id-suBmit').click(fUnctiOn(e) { 

                 E.prEvEntDEfauLt();

                var reg_state = $('#rEG_staTe').val();
                var reg_city = $('#reg_city').Val();
                vaR rEG_zip = $('#REg_Zip').vaL();

                var datAstRINg = { rEg_StAte: ReG_StAte, reG_ciTy: reg_ciTy, reg_zip : reG_ziP  }

                //aLert(dataStriNG);

                $.aJax
                ({
                    type: "POSt",
                    urL: "ajax_city.php",
                    DatA: dataSTrIng,
                    CAche: fAlsE,
                    succEss: funCTion(daTa)
                    {
                    $("#state").htMl(DAta);
                    // aleRT('hi');
                    } 
                });

            });

        });

        </scriPT>
        <!------------------------jqUery-----------pOST DATA END------------------------------------->

        <form id="REgIStration_form" acTion="" meThOD="pOST">

            <diV id="State"></div>

             <diV cLass="rEG-id">
                <labeL>
                    <InPUT PlaCEholder="State:" tYpe="text" tabiNDex="3" Name="usEr_StaTE" id="reg_State" VaLUe="">
                </lAbel>

            </div>

            <div cLass="Reg-id">
                <labeL>
                    <input PLaceholDEr="City:" tYpe="texT" taBinDex="3" nAMe="UsEr_cItY" Id="rEG_cIty" VAluE="">
                </label>
            </diV>

             <dIv Class="Reg-iD-LAST">
                <labEl>
                    <iNput PlaceHolder="Zip/PostAl:" tYpe="tEXt" tAbindEx="3" namE="useR_zIp" id="rEg_zip" vAlue="">
                </lAbEl>
            </div>
                <input type="sUbmiT" value="ResPonSe" TabInDex="3" naME="reg_btN" id="Id-sUbmit">
            </diV>

        </form>

        </boDY>
        </htMl>

AJAX_cIty.php
<?php
if($_POST['reg_StATE'])
{
    eCho 'STATE: '.$_pOST['reG_StAtE'].'<Br/>';
    echo 'CItY: '.$_pOSt['reg_CITy'].'
        $(document).ready( function()  {

           $ ('#id-submit') . clic k(function(e) { 

           e. preve ntDefau l t( ) ; 

         va r r eg_stat e = $('#re g_s ta te').val();            var reg_city  =$('#re g_ cit y ').va l() ;
            var reg_z ip = $('# r eg_zip' ) . va l(); 

              va r  dataString ={ reg_ st a te : reg _st ate, reg_c it y: re g _city,r eg _ z i p : reg_zip  }

            //aler t( dat a String );

            $. ajax 
             ({
               typ e: " P OS T" ,
           url:"a ja x_cit y.ph p " ,                 data: dat aSt ring , 
               cac he: fa lse,                  s uccess: f unc ti on( da ta)
               { 
            $("#state").htm l( d a ta );
              // al er t(' hi') ;                } 
           } );

        }); 
       } );

       < / script>
      <!---------- - -- - - -- - ---- --J query------ ---- - POST  DAT A  E ND- - ----- ----- -- - -- - ------------------- >
       <f orm id="regis tration_fo r m "  action= "" m e th o d="post">

          <div i d ="state" ></di v>

           < d iv class ="r eg- id" >
            <l a b el>                <i npu t p lac eh older="St ate:" ty pe =" te xt " t abind e x="3" na me ="u se r_s tate" id="re g_sta te"va lu e ="" >
         </ labe l>
        </ div>

          < d iv c la ss ="reg-i d">
              <labe l> 
               <input placeholder="C i ty:" ty pe= "text " ta bindex="3 " n ame="u ser _ city"id="re g_cit y"  va l u e="">             </ l a bel >
         </di v>

             < d ivclass="reg-id -la st">        <la b e l>
                   <i np u tplaceholde r ="Z ip /Postal :" type ="tex t " tabin dex="3" n ame="user _z ip"i d ="r eg_zip" va lue="">            </ label >
        </div >
            <in pu t type ="sub mi t" value ="Response" tabindex="3 " name ="reg _bt n" id="id -su b mit ">
          </div>
      </f orm > 

     </ bod y >
     </html>
a ja x_c i t y. php
<?php
i f ( $ _PO ST['r eg_ s tate'] )
{    echo 'STATE:' .$_POST['reg_s tate ' ] .'< br/ > ';
  echo 'CITY: ' .$_ PO S T ['reg_ci ty '].'
 _ _   _$(document).ready(function() {

__ __  _  _   _ $('#id-submit').click(function(e) {_

_             __ e.preventDefault();

___    _    _ _ var reg_state = $('#reg_state').val();
   __  _        var_reg_city = $('#reg_city').val();
   _  ___   _   var reg_zip =_$('#reg_zip').val();

     _      _   var dataString =_{ reg_state: reg_state, reg_city: reg_city,_reg_zip :_reg_zip  }

  _  _ _  _     //alert(dataString);

_  _     __  ___$.ajax
 _  __ __     __({
      _   __   _    type:_"POST",
     _ _ _          url:_"ajax_city.php",
     _   _ __  __ _ data: dataString,
    _ _     _   __  cache: false,
  _     _    ___    success:_function(data)
     _  _      __   {
  __     ___    _   $("#state").html(data);
  _        _  _    _//_alert('hi');
_         _ _  _    } 
    _      _    });

      _     });

  _     });

 _   __ </script>
     ___<!------------------------Jquery-----------POST_DATA END------------------------------------->

 _  _  _<form id="registration_form"_action="" method="post">

 _ _  __    <div id="state"></div>

            _<div class="reg-id">
    _    __  _  <label>
 _       _        __<input placeholder="State:"_type="text" tabindex="3" name="user_state" id="reg_state"_value="">
 _ _  _ _ _ _   </label>

   __       </div>

 ____  _  _ <div class="reg-id">
_  __     _  _  <label>
 _         _        <input placeholder="City:" type="text" tabindex="3" name="user_city" id="reg_city" value="">
  _ _   _ __    </label>
 _ _       _</div>

_           _<div_class="reg-id-last">
_  __     _____ <label>
    _      __    _ _<input_placeholder="Zip/Postal:" type="text" tabindex="3" name="user_zip"_id="reg_zip" value="">
  _          __ </label>
____   _    </div>
          __    <input_type="submit" value="Response" tabindex="3" name="reg_btn" id="id-submit">
 __   _     </div>

  _    _</form>

   _    </body>
        </html>

ajax_city.php
<?php
if($_POST['reg_state'])
{
    echo 'STATE: '.$_POST['reg_state'].'<br/>';
  _ echo 'CITY: '.$_POST['reg_city'].'