Guest User

Untitled

a guest
May 15th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.61 KB | None | 0 0
  1. $.ajax({
  2.     url: "src/php/ajax.php",
  3.         data:{solicitud:"prueba"},
  4.         type: "POST",
  5.     dataType: "json",
  6.         success:function(data){
  7.             var availableTags = data;
  8.         $( "#tags" ).autocomplete({
  9.             source: availableTags
  10.         });
  11.     }
  12. });
  13.  
  14. /*****************************************************/
  15.  
  16.  $sql_giros="SELECT * FROM `t_giros_emp`";
  17.         $query_giros=mysql_query($sql_giros,$link);
  18.         $stack = array();
  19.         while($giro=mysql_fetch_array($query_giros)){
  20.             array_push($stack,ucfirst(strtolower(($giro['c_descr_giro']))));
  21.         }
  22.         echo json_encode($stack);
Add Comment
Please, Sign In to add comment