php - filter Query data with var from html value input -


if have input on html code

<input value="0001" name="call" id="call"> 

how call value in php script without submit? event onblur or ??

the php file have query :

select * table field = (input  html value) 

you need use ajax that.

<script> $(document).ready(function() { var value = $("#call").val(); $.ajax({ url: "you file path php code written fetch value database", type:"post", data:{"call":value}, success:function(result){alert(result);} })  }); </script> 

and on php file.

<?php  write code sql connection ;  $feild_value = $_post["call"];  // can use  $feild_value variable in query;  select * table field = $feild_value ;  //echo query result here echo $query_result; die; ?> 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -